Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Firebird Driver for Qt 6.6

Firebird Driver for Qt 6.6

Scheduled Pinned Locked Moved Solved Installation and Deployment
6 Posts 2 Posters 730 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dikiy
    wrote on last edited by
    #1

    Good afternoon. There is no way to build a driver for Firebird in Qt 6.6 under Windows. Has anyone tried it? Previously, in version Qt 5.12 it was much easier, but now Qt6 is forced to use CMake and Ninja to build SQL drivers and this bundle does not work. And the old driver project from 5.12 requires too many things, which are now removed in 6.6.

    The build files that Qt provides need to be finalized, because there are default paths everywhere. I edited them all. Configured all paths. But this is the way out:

    C:\Users\user>C:\Qt\6.6.0\mingw_64\bin\qt-cmake-user -G Ninja -DCMAKE_MAKE_PROGRAM="C:\Qt\Tools\Ninja\ninja.exe" -S C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers -B C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\ibase\build -DInterbase_INCLUDE_DIR="H:\Qt\Firebird_3.0\Firebird_3_0\include " -DInterbase_LIBRARY="H:\Qt\Firebird_3.0\Firebird_3_0\lib\fbclient_ms.lib "
    -- The CXX compiler identification is unknown
    -- The C compiler identification is unknown
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/g++.exe
    -- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/g++.exe - broken
    CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/CMakeTestCXXCo mpiler.cmake:62 (message):
    The C++ compiler

    "C:/Qt/Tools/mingw1120_64/bin/g++.exe"

    is not able to compile a simple test program.

    It fails with the following output:

    Change Dir: C:/Qt/6.6.0/Src/qtbase/src/plugins/sqldrivers/ibase/build/CM akeFiles/CMakeTmp

    Run Build Command(s):C:\Qt\Tools\Ninja\ninja.exe cmTC_29d4b && [1/2] Building CXX object CMakeFiles\cmTC_29d4b.dir\testCXXCompiler.cxx.obj
    FAILED: CMakeFiles/cmTC_29d4b.dir/testCXXCompiler.cxx.obj
    C:\Qt\Tools\mingw1120_64\bin\g++.exe -o CMakeFiles\cmTC_29d4b.dir\testCXXCompiler.cxx.obj -c C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\ibase\build\CM akeFiles\CMakeTmp\testCXXCompiler.cxx
    ninja: build stopped: subcommand failed.

    Christian EhrlicherC 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from 3rd Party Software on
    • D Offline
      D Offline
      dikiy
      wrote on last edited by
      #6

      Building an SQL driver for Qt6.

      Valid for software versions:
      Windows 10 Pro x64 22H2 19045.2006 120.2212.4180.0
      Qt 6.6.0
      Qt Creator 11.0.3 (6.4.3, MSVC 2019, x86_64)
      MinGW 11.2.0 x64
      CMake 3.24.2
      Ninja 28.11.2020 15:06
      Firebird 3.0.11.11703

      The official documentation on this issue describes a parallel reality with a spherical driver in vacuum.

      1. Qt must be installed with the source code.
      2. Firebird must be installed with the source code.
      3. By default Firebird is installed here:
        C:\Program Files\Firebird
        A space in the name of the "Program Files" folder makes it impossible to build the driver. Therefore, we make a copy to build the driver here:
        H:\Qt\Firebird
      4. Create a folder to build the driver here:
        H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release
        The folder should be empty. If the folder already exists, then you need to delete all the contents from it.
      5. Check the driver sources here:
        C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers
        There should be a file there CMakeLists.txt , it will be needed.
        And there should not be a CMakeLists.txt.user file, it will be created later. If this file exists, we delete it.
      6. Open Qt Creator. Menu "File", "Open file or project" and open this file:
        C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\CMakeLists.txt
      7. Select the necessary compiler: MinGW 11.2.0 x64.
        On the right, expand the additional settings and uncheck all the build options except Release.
        Apply the changes (button, lower right corner).
      8. In the "Editor" mode, the "QSQLiteDriverPlugin" project opens, which will have subfolders corresponding to different types of databases, but the "ibase" subfolder for the Firebird driver will not be there.
      9. Switch to the "Projects" mode. Check that the "Build directory" is correct:
        H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release .
      10. Below we are working with the "Current Configuration" tab.
        The key "FEATURE_sql_ibase" in the table will have the value "OFF".
        To make the settings, check the "Advanced" on the right.
      11. There is a search field above the table of keys and values. We enter Interbase_INCLUDE_DIR there. Changing the key value to
        H:\Qt\Firebird\Firebird_3_0\include
        To save the changes, click on the name of the key, i.e. on the text Interbase_INCLUDE_DIR.
      12. In the search, enter Interbase_LIBRARY and change the value of this key to
        H:\Qt\Firebird\Firebird_3_0\lib\fbclient_ms.lib
        To save the changes, click on the name of the key.
      13. Uncheck "Advanced".
      14. Under the key table, click the "Run CMake" button. You must agree to the request to apply key changes. You will be prompted to change three keys: two that have been edited and the third is FEATURE_sql_ibase with the new value "ON".
      15. Make sure that the key "FEATURE_sql_ibase" in the table now has the value "ON".
      16. Uncheck the checkboxes next to unnecessary keys such as: "FEATURE_sql_odbc" and "FEATURE_sql_sqlite".
      17. In the "Editor" mode, the "QSQLiteDriverPlugin" project will now have an "ibase" subfolder for the Firebird driver.
      18. Menu "Build", "Build the project "QSQLiteDriverPlugin"". If you are asked to apply changes to change the values of the keys "FEATURE_sql_odbc" and "FEATURE_sql_sqlite" to the "OFF" state, you should agree.
      19. The driver file, in case of a successful build, will be here:
        H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release\plugins\sqldrivers\qsqlibase.dll
      20. The file is copied to the folder
        C:\Qt\6.6.0\mingw_64\plugins\sqldrivers
        and also where you need it to copy to.
      1 Reply Last reply
      1
      • D dikiy

        Good afternoon. There is no way to build a driver for Firebird in Qt 6.6 under Windows. Has anyone tried it? Previously, in version Qt 5.12 it was much easier, but now Qt6 is forced to use CMake and Ninja to build SQL drivers and this bundle does not work. And the old driver project from 5.12 requires too many things, which are now removed in 6.6.

        The build files that Qt provides need to be finalized, because there are default paths everywhere. I edited them all. Configured all paths. But this is the way out:

        C:\Users\user>C:\Qt\6.6.0\mingw_64\bin\qt-cmake-user -G Ninja -DCMAKE_MAKE_PROGRAM="C:\Qt\Tools\Ninja\ninja.exe" -S C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers -B C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\ibase\build -DInterbase_INCLUDE_DIR="H:\Qt\Firebird_3.0\Firebird_3_0\include " -DInterbase_LIBRARY="H:\Qt\Firebird_3.0\Firebird_3_0\lib\fbclient_ms.lib "
        -- The CXX compiler identification is unknown
        -- The C compiler identification is unknown
        -- The ASM compiler identification is GNU
        -- Found assembler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe
        -- Detecting CXX compiler ABI info
        -- Detecting CXX compiler ABI info - failed
        -- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/g++.exe
        -- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/g++.exe - broken
        CMake Error at C:/Qt/Tools/CMake_64/share/cmake-3.24/Modules/CMakeTestCXXCo mpiler.cmake:62 (message):
        The C++ compiler

        "C:/Qt/Tools/mingw1120_64/bin/g++.exe"

        is not able to compile a simple test program.

        It fails with the following output:

        Change Dir: C:/Qt/6.6.0/Src/qtbase/src/plugins/sqldrivers/ibase/build/CM akeFiles/CMakeTmp

        Run Build Command(s):C:\Qt\Tools\Ninja\ninja.exe cmTC_29d4b && [1/2] Building CXX object CMakeFiles\cmTC_29d4b.dir\testCXXCompiler.cxx.obj
        FAILED: CMakeFiles/cmTC_29d4b.dir/testCXXCompiler.cxx.obj
        C:\Qt\Tools\mingw1120_64\bin\g++.exe -o CMakeFiles\cmTC_29d4b.dir\testCXXCompiler.cxx.obj -c C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\ibase\build\CM akeFiles\CMakeTmp\testCXXCompiler.cxx
        ninja: build stopped: subcommand failed.

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        This has nothing to do with cmake nor ninja. Are you sure g++.exe exists in the given directory? Try to execute it on the command line.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        D 1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          This has nothing to do with cmake nor ninja. Are you sure g++.exe exists in the given directory? Try to execute it on the command line.

          D Offline
          D Offline
          dikiy
          wrote on last edited by
          #3

          @Christian-Ehrlicher, hello. Thank you. Yes, the file really exists there, because I specified this path myself. It responds.

          C:\Users\user>C:\Qt\Tools\mingw1120_64\bin\g++
          g++: fatal error: no input files
          compilation terminated.

          Christian EhrlicherC 1 Reply Last reply
          0
          • D dikiy

            @Christian-Ehrlicher, hello. Thank you. Yes, the file really exists there, because I specified this path myself. It responds.

            C:\Users\user>C:\Qt\Tools\mingw1120_64\bin\g++
            g++: fatal error: no input files
            compilation terminated.

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            But as you can see there is a problem creating a simple executable with it. Create a simple main.cpp and try to compile it on the command line. I would guess there are some errors as the environment for the compiler is not properly set up.
            Also the official documentation suggest to create a build directory and build the stuff in there instead in the source directory.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dikiy
              wrote on last edited by
              #5

              The problem is solved. The driver has been received. I will publish the decision in a separate message. Perhaps the administrator will want to pin this message somewhere.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dikiy
                wrote on last edited by
                #6

                Building an SQL driver for Qt6.

                Valid for software versions:
                Windows 10 Pro x64 22H2 19045.2006 120.2212.4180.0
                Qt 6.6.0
                Qt Creator 11.0.3 (6.4.3, MSVC 2019, x86_64)
                MinGW 11.2.0 x64
                CMake 3.24.2
                Ninja 28.11.2020 15:06
                Firebird 3.0.11.11703

                The official documentation on this issue describes a parallel reality with a spherical driver in vacuum.

                1. Qt must be installed with the source code.
                2. Firebird must be installed with the source code.
                3. By default Firebird is installed here:
                  C:\Program Files\Firebird
                  A space in the name of the "Program Files" folder makes it impossible to build the driver. Therefore, we make a copy to build the driver here:
                  H:\Qt\Firebird
                4. Create a folder to build the driver here:
                  H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release
                  The folder should be empty. If the folder already exists, then you need to delete all the contents from it.
                5. Check the driver sources here:
                  C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers
                  There should be a file there CMakeLists.txt , it will be needed.
                  And there should not be a CMakeLists.txt.user file, it will be created later. If this file exists, we delete it.
                6. Open Qt Creator. Menu "File", "Open file or project" and open this file:
                  C:\Qt\6.6.0\Src\qtbase\src\plugins\sqldrivers\CMakeLists.txt
                7. Select the necessary compiler: MinGW 11.2.0 x64.
                  On the right, expand the additional settings and uncheck all the build options except Release.
                  Apply the changes (button, lower right corner).
                8. In the "Editor" mode, the "QSQLiteDriverPlugin" project opens, which will have subfolders corresponding to different types of databases, but the "ibase" subfolder for the Firebird driver will not be there.
                9. Switch to the "Projects" mode. Check that the "Build directory" is correct:
                  H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release .
                10. Below we are working with the "Current Configuration" tab.
                  The key "FEATURE_sql_ibase" in the table will have the value "OFF".
                  To make the settings, check the "Advanced" on the right.
                11. There is a search field above the table of keys and values. We enter Interbase_INCLUDE_DIR there. Changing the key value to
                  H:\Qt\Firebird\Firebird_3_0\include
                  To save the changes, click on the name of the key, i.e. on the text Interbase_INCLUDE_DIR.
                12. In the search, enter Interbase_LIBRARY and change the value of this key to
                  H:\Qt\Firebird\Firebird_3_0\lib\fbclient_ms.lib
                  To save the changes, click on the name of the key.
                13. Uncheck "Advanced".
                14. Under the key table, click the "Run CMake" button. You must agree to the request to apply key changes. You will be prompted to change three keys: two that have been edited and the third is FEATURE_sql_ibase with the new value "ON".
                15. Make sure that the key "FEATURE_sql_ibase" in the table now has the value "ON".
                16. Uncheck the checkboxes next to unnecessary keys such as: "FEATURE_sql_odbc" and "FEATURE_sql_sqlite".
                17. In the "Editor" mode, the "QSQLiteDriverPlugin" project will now have an "ibase" subfolder for the Firebird driver.
                18. Menu "Build", "Build the project "QSQLiteDriverPlugin"". If you are asked to apply changes to change the values of the keys "FEATURE_sql_odbc" and "FEATURE_sql_sqlite" to the "OFF" state, you should agree.
                19. The driver file, in case of a successful build, will be here:
                  H:\Qt\build-sqldrivers-Desktop_Qt_6_6_0_MinGW_64_bit-Release\plugins\sqldrivers\qsqlibase.dll
                20. The file is copied to the folder
                  C:\Qt\6.6.0\mingw_64\plugins\sqldrivers
                  and also where you need it to copy to.
                1 Reply Last reply
                1
                • D dikiy has marked this topic as solved on

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved