How to create the plugin of Firebird IBASE for QT 5.10
Solved
General and Desktop
-
Compiler: MSVC14
QT: 5.10
Firebird: 3.0.3
OS: Windows 10I 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- Run cmd.exe.
- Run the command:
cd D:\Tools\Qt\5.13.2\msvc2017\bin - Perform:
qtenv2.bat - Perform:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"vcvarsall.bat x86 - Perform:
cd D:\Tools\Qt\5.13.2\Src\qtbase\src\plugins\sqldrivers\ibase - 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. - 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 - 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.