Error building QDB2 with Qt 5.3.2 64 bit



  • I want to build the QDB2 driver. But there comes an error... See the lines below:

    SystemInfo:
    openSuse Linux 13.1 64 bit
    Qt 5.3.2 64 bit
    DB2 10.5 Fixpack 4 - 64 bit

    @hdk-cpp-1:/opt/Qt5.3.2/5.3/Src/qtbase/src/plugins/sqldrivers/db2 # /opt/Qt5.3.2/5.3/gcc_64/bin/qmake "INCLUDEPATH+=/root/Downloads/dsdriver/include" "LIBS+=-L/root/Downloads/dsdriver/lib -ldb2"
    hdk-cpp-1:/opt/Qt5.3.2/5.3/Src/qtbase/src/plugins/sqldrivers/db2 # make
    g++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++ -I. -I/work/build/icu_install/include -I/root/Downloads/dsdriver/include -I/opt/Qt5.3.2/5.3/gcc_64/include/QtSql/5.3.2 -I/opt/Qt5.3.2/5.3/gcc_64/include/QtSql/5.3.2/QtSql -I/opt/Qt5.3.2/5.3/gcc_64/include -I/opt/Qt5.3.2/5.3/gcc_64/include/QtSql -I/opt/Qt5.3.2/5.3/gcc_64/include/QtCore/5.3.2 -I/opt/Qt5.3.2/5.3/gcc_64/include/QtCore/5.3.2/QtCore -I/opt/Qt5.3.2/5.3/gcc_64/include/QtCore -I.moc -o .obj/qsql_db2.o ../../../sql/drivers/db2/qsql_db2.cpp
    ../../../sql/drivers/db2/qsql_db2.cpp: In constructor ‘QDB2Driver::QDB2Driver(Qt::HANDLE, Qt::HANDLE, QObject*)’:
    ../../../sql/drivers/db2/qsql_db2.cpp:1143:26: error: cast from ‘Qt::HANDLE {aka void*}’ to ‘SQLHANDLE {aka int}’ loses precision [-fpermissive]
    d->hEnv = (SQLHANDLE)env;
    ^
    ../../../sql/drivers/db2/qsql_db2.cpp:1144:26: error: cast from ‘Qt::HANDLE {aka void*}’ to ‘SQLHANDLE {aka int}’ loses precision [-fpermissive]
    d->hDbc = (SQLHANDLE)con;
    ^
    ../../../sql/drivers/db2/qsql_db2.cpp: In member function ‘virtual bool QDB2Driver::open(const QString&, const QString&, const QString&, const QString&, int, const QString&)’:
    ../../../sql/drivers/db2/qsql_db2.cpp:1208:79: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    r = SQLSetConnectAttr(d->hDbc, SQL_ATTR_ACCESS_MODE, (SQLPOINTER) v, 0);
    ^
    ../../../sql/drivers/db2/qsql_db2.cpp:1211:81: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    r = SQLSetConnectAttr(d->hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) v, 0);
    ^
    ../../../sql/drivers/db2/qsql_db2.cpp: In member function ‘virtual bool QDB2Driver::hasFeature(QSqlDriver::DriverFeature) const’:
    ../../../sql/drivers/db2/qsql_db2.cpp:1510:12: warning: enumeration value ‘CancelQuery’ not handled in switch [-Wswitch]
    switch (f) {
    ^
    ../../../sql/drivers/db2/qsql_db2.cpp: In member function ‘bool QDB2Driver::setAutoCommit(bool)’:
    ../../../sql/drivers/db2/qsql_db2.cpp:1583:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (SQLPOINTER)ac,
    ^
    make: *** [.obj/qsql_db2.o] Error 1
    hdk-cpp-1:/opt/Qt5.3.2/5.3/Src/qtbase/src/plugins/sqldrivers/db2 #
    @

    Is there anybody who can help?

    kind regards
    Heino


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.