I recently installed IBM DB2 ver 9.7 and the development library.
I went to the Qt src/plugins/sqldrivers/db2 directory and modified the pro file to get all the compile errors I could out:
TARGET = qsqldb2
HEADERS = ../../../sql/drivers/db2/qsql_db2.h
SOURCES = main.cpp \
../../../sql/drivers/db2/qsql_db2.cpp
INCLUDEPATH+=/opt/ibm/db2/V9.7/include
LIBS+=-L/opt/ibm/db2/V9.7/lib32 -ldb2
# unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2
# win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli
include(../qsqldriverbase.pri)
TARGET = qsqldb2
HEADERS = ../../../sql/drivers/db2/qsql_db2.h
SOURCES = main.cpp \
../../../sql/drivers/db2/qsql_db2.cpp
INCLUDEPATH+=/opt/ibm/db2/V9.7/include
LIBS+=-L/opt/ibm/db2/V9.7/lib32 -ldb2
# unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2
# win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli
include(../qsqldriverbase.pri)
To copy to clipboard, switch view to plain text mode
I get 2 warnings:
/home/vince/Downloads/Qt/qt-x11-opensource-src-4.5.2/src/plugins/sqldrivers/db2/../../../sql/drivers/db2/qsql_db2.cpp:1479: warning: enumeration value ‘FinishQuery’ not handled in switch
/home/vince/Downloads/Qt/qt-x11-opensource-src-4.5.2/src/plugins/sqldrivers/db2/../../../sql/drivers/db2/qsql_db2.cpp:299: warning: ‘double qGetDoubleData(SQLHANDLE, int, bool&)’ defined but not used
Deciding to ignore for now, I copied the library file to the /usr/share/qt4/plugins/sqldrivers directory but my app doesn't load the driver and the output indicates that the QDB2 driver isn't amongst the available drivers.
Anyone know what the problem is ?
Could the warnings stop the driver from loading ?
Bookmarks