Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to create the plugin of Firebird IBASE for QT 5.10



  • Compiler: MSVC14
    QT: 5.10
    Firebird: 3.0.3
    OS: Windows 10

    I tried first to compile following these instructions: http://doc.qt.io/qt-5/sql-driver.html.

    cd %QTDIR%\qtbase\src\plugins\sqldrivers
    qmake -- IBASE_INCDIR=C:/interbase/include IBASE_LIBS=-lfbclient
    nmake sub-ibase
    

    But this didn't work. qmake gave me the output:

    Configure summary:
    QT Sql:
    InterBase..........................................................no
    

    After some research in the internet I found a solution:

    Uncomment # QMAKE_USE += ibase in your ibase.pro.

    Then compile the driver the old way:

    cd %QTDIR%\src\plugins\sqldrivers\ibase
    qmake "INCLUDEPATH+=C:\firebird\include" "LIBS+=C:\firebird\lib\lfbclient_ms.lib" ibase.pro
    nmake
    

    I hope this will save some of your time... :-)



  • Thank you so much, dear colleague!
    I want to make a remark to create a driver for a bunch of Qt 5.13.2, Firebird 4.0 (beta) and MS VS 2017. In this case, for 32-bit.

    Note. I have:

    QT Installation Directory: D:\Tools\Qt
    Firebird Installation Directory: D:\Tools\FB\Servers\40

    1. Run cmd.exe.
    2. Run the command:
      cd D:\Tools\Qt\5.13.2\msvc2017\bin
    3. Perform:
      qtenv2.bat
    4. Perform:
      "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"vcvarsall.bat x86
    5. Perform:
      cd D:\Tools\Qt\5.13.2\Src\qtbase\src\plugins\sqldrivers\ibase
    6. Then open the ibase.pro file for editing, find the line
      QMAKE_USE + = ibase
      Put the comment character # at the beginning of the line:
      #QMAKE_USE + = ibase
      Save the ibase.pro file.
    7. Perform:
      nmake clean
      8.Perform:
      qmake "INCLUDEPATH+=D:\Tools\FB\Servers\40\include" "LIBS+=D:\Tools\FB\Servers\40\lib\fbclient_ms.lib" ibase.pro
      9.Perform:
      nmake
    8. Thats all! See results in
      D:\Tools\Qt\5.13.2\Src\qtbase\src\plugins\sqldrivers\plugins\sqldrivers

    Thanks again.

    I hope these lines also save some time.


Log in to reply