Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.7, 5.6.0, 5.9.1
-
3acf5d61a14b70285625bc5276a842fc86f0c7af
Description
In the online documentation of Qt5 the following command line is described:
cd $QTDIR/qtbase/src/plugins/sqldrivers/db2
qmake "INCLUDEPATH+=$DB2DIR/include" "LIBS+=-L$DB2DIR/lib -ldb2" db2.pro
make
Which works most likely for building a 32Bit DB2 plugin using DB2 v10.5fp7.
However: for building a 64Bit version of the plugin the preprocessor define
"ODBC64" needs to be defined as well:
cd $QTDIR/qtbase/src/plugins/sqldrivers/db2
qmake "INCLUDEPATH+=$DB2DIR/include" "LIBS+=-L$DB2DIR/lib -ldb2"
"QMAKE_CXXFLAGS+=-DODBC64" db2.pro
make
However: when doing so the source code of
../../../sql/drivers/db2/qsql_db2.cpp
does still not compile due to the use of wrong datatypes.
Several function expect e.g. SQLLEN instead of a SQLINTEGER or SQLULEN instead
of SQLUINTEGER.
Please find attached two patches which fix the compilation of the DB2 plugins
of:
- Qt 4.8.7
- Qt 5.6.0
NOTE: for Qt4 simply take out "qtbase" from the path of the db2 plugin.
Attachments
Issue Links
- is duplicated by
-
QTBUG-62689 Cannot compile DB2 plugin on 64bit linux
- Closed
-
QTBUG-63995 QDB2 Plugin will not Compile on x86_64: cast loses precision
- Closed