how can i compile the QDB2 plugins in opensuse linux 13.2 64bit



  • Hello everyone, i want to make an application that insert data to ibm db2.
    And, i have finish coding in windows 7 64bit OS,but while i try to compile
    it in linux ,there are something wrong happend, like below:

    /home/huma/Qt5.5.0/5.5/gcc_64/bin/qmake "INCLUDEPATH+=/opt/ibm/db2/V10.5/include" "LIBS+=-L$DB2DIR/lib64 -ldb2"

    make

    ../../../sql/drivers/db2/qsql_db2.cpp: In constructor ‘QDB2Driver::QDB2Driver(Qt::HANDLE, Qt::HANDLE, QObject*)’:
    ../../../sql/drivers/db2/qsql_db2.cpp:1135: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:1136: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:1200: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:1203: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:1502: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:1575:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    (SQLPOINTER)ac,
    ^
    Makefile:844: recipe for target '.obj/qsql_db2.o' failed
    make: *** [.obj/qsql_db2.o] Error 1

    Then , is anybody met this problem before, and what can i do ?
    Thanks very much!



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