How to Build plugin QIBASE for FIREBIRD QT 5.0.2



  • Hello everybody. I have a problem and would like someone to help me. How do I create plugin for firebird-database 2.5.2. I've tried every way and so far nothing .. I can not compile .. I'm using qt 5.0.2 and mingw compiler. Whenever I try appears errors ...
    Someone help please?

    @
    TARGET = qsqlibase

    SOURCES = main.cpp
    OTHER_FILES += ibase.json

    INCLUDEPATH += "C:/Program Files/Firebird/Firebird_2_5/include" C:/tmp/src/include
    LIBS += "C:/Program Files/Firebird/Firebird_2_5/lib/fbclient_ms.lib"

    include(../../../sql/drivers/ibase/qsql_ibase.pri)

    PLUGIN_CLASS_NAME = QIBaseDriverPlugin
    include(../qsqldriverbase.pri)
    @
    erro
    @
    c:\qt\qt5.0.2\tools\mingw\i686-w64-mingw32\include\iscsidsc.h:8: In file included from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/iscsidsc.h:8:0,
    C:\Qt\Qt5.0.2\5.0.2\Src\qtbase\src\sql\drivers\ibase\qsql_ibase.cpp:60: from ......\sql\drivers\ibase\qsql_ibase.cpp:60@

    [[Merged two threads, Tobias]]



  • Hello everybody. I have a problem and would like someone to help me. How do I create plugin for firebird-database 2.5.2. I’ve tried every way and so far nothing .. I can not compile .. I’m using qt 5.0.2 and mingw compiler. Whenever I try appears errors …
    Someone help please?

    @
    TARGET = qsqlibase

    SOURCES = main.cpp
    OTHER_FILES += ibase.json
     
    INCLUDEPATH += "C:/Program Files/Firebird/Firebird_2_5/include" C:/tmp/src/include
    LIBS += "C:/Program Files/Firebird/Firebird_2_5/lib/fbclient_ms.lib"
     
     
    include(../../../sql/drivers/ibase/qsql_ibase.pri)
     
    PLUGIN_CLASS_NAME = QIBaseDriverPlugin
    include(../qsqldriverbase.pri)
    

    @
    error
    @
    c:\qt\qt5.0.2\tools\mingw\i686-w64-mingw32\include\iscsidsc.h:8: In file included from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/iscsidsc.h:8:0,
    C:\Qt\Qt5.0.2\5.0.2\Src\qtbase\src\sql\drivers\ibase\qsql_ibase.cpp:60: from ......\sql\drivers\ibase\qsql_ibase.cpp:60

    @


  • Lifetime Qt Champion

    Hi,

    Please don't multi post your questions.

    Can you provide a more complete error log ? This one doesn't say much



  • Good ibase.pro edited the file and added the include and lib path firebird. Then I qmake-o Makefile ibase.pro. Then mingw32-make ... Ai generated this error ....

    @
    qmake-o Makefile ibase.pro
    mingw32-make
    @
    error
    @
    11:04:49: Starting: "C:\Qt\Qt5.0.2\Tools\MinGW\bin\mingw32-make.exe"
    C:/Qt/Qt5.0.2/Tools/MinGW/bin/mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/ibase'
    g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"C:\Program Files\Firebird\Firebird_2_5\include" -I"C:\tmp\src\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtCore" -I".moc\release_shared" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\mkspecs\win32-g++" -o .obj\release_shared\qsql_ibase.o ......\sql\drivers\ibase\qsql_ibase.cpp
    In file included from c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/iscsidsc.h:8:0,
    from ......\sql\drivers\ibase\qsql_ibase.cpp:60:
    c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/ntddscsi.h:42:5: error: 'USHORT' does not name a type
    c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/ntddscsi.h:43:5: error: 'UCHAR' does not name a type
    c:\qt\qt5.0.2\tools\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/ntddscsi.h:237:5: error: 'PVOID' does not name a type
    ......\sql\drivers\ibase\qsql_ibase.cpp: In member function 'virtual bool QIBaseResult::gotoNext(QSqlCachedResult::ValueCache&, int)':
    ......\sql\drivers\ibase\qsql_ibase.cpp:1129:23: warning: enumeration value 'LowPrecisionDouble' not handled in switch [-Wswitch]
    11:04:54: The process "C:\Qt\Qt5.0.2\Tools\MinGW\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project ibase (kit: Desktop Qt 5.0.2 MinGW 32bit)
    When executing step 'Make'
    @



  • Is it because I'm using the mingw compiler and incompatibility with libraries firebird?


  • Lifetime Qt Champion

    That might be the case indeed, did you check what compiler they are using ?



  • I'm using the mingw compiler? firebird now I do not know? as said in the documentation that led to compile now do not know ...


  • Lifetime Qt Champion

    If you refer to "this":http://www.firebirdsql.org/en/building-the-code/ page, they use visual studio.



  • then mingw only serves to firebird linux?
    for firebird windows then have to use the compiler windows .. ?


  • Lifetime Qt Champion

    Please, at least do a little "research":http://bit.ly/15MrM7W.



  • This works for me:

    Assume that firebird path is d:\firebird and Qt path is c:\qt

    • Open QT console and write:
      cd C:\Qt\5.3\Src\qtbase\src\plugins\sqldrivers\ibase
      qmake "INCLUDEPATH+=D:/firebird/include" "LIBS+=-LD:/firebird/lib" "LIBS+=-lfbclient_ms" ibase.pro
      mingw32-make
      mingw32-make install

    In C:\Qt\5.3\mingw482_32\plugins\sqldrivers appears qsqlibase.dll and qsqlibased.dll



  • Hello,

    I have this error:
    .obj/release/main.o:main.cpp:(.text+0x50): undefined reference to QIBaseDriver::QIBaseDriver(QObject*)' .obj/release/moc_qsql_ibase_p.o:moc_qsql_ibase_p.cpp:(.text+0x45): undefined reference toQIBaseDriver::qHandleEventNotification(void*)'
    .obj/release/moc_qsql_ibase_p.o:moc_qsql_ibase_p.cpp:(.text+0x102): undefined reference to `QIBaseDriver::qHandleEventNotification(void*)'

    What do you think?

    Thanks



  • Hello,

    I have this error:
    .obj/release/main.o:main.cpp:(.text+0x50): undefined reference to QIBaseDriver::QIBaseDriver(QObject*)' .obj/release/moc_qsql_ibase_p.o:moc_qsql_ibase_p.cpp:(.text+0x45): undefined reference toQIBaseDriver::qHandleEventNotification(void*)'
    .obj/release/moc_qsql_ibase_p.o:moc_qsql_ibase_p.cpp:(.text+0x102): undefined reference to `QIBaseDriver::qHandleEventNotification(void*)'

    What do you think?

    Thanks



  • Hello,

    i changed ibase.pro with this source code so now it builds.

    TARGET = qsqlibase

    INCLUDEPATH += c:/firebird_2.5/WOW64/lib

    win32:INCLUDEPATH += C:/Firebird_2_5/include
    win32:LIBS += -lfbclient_ms
    win32:LIBS += -LC:/Firebird_2_5/WOW64/lib

    unix:!contains( LIBS, .gds. ):!contains( LIBS, .libfb. ):LIBS *= -lgds

    win32:!contains( LIBS, .gds. ):!contains( LIBS, .fbclient. ) {
    !win32-borland:LIBS *= -lgds32_ms
    win32-borland:LIBS += gds32.lib
    }

    include(../qsqldriverbase.pri)

    HEADERS +=
    ../../../sql/drivers/ibase/qsql_ibase_p.h

    SOURCES +=
    ../../../sql/drivers/ibase/qsql_ibase.cpp



  • Hello,

    i changed ibase.pro with this source code so now it builds.

    TARGET = qsqlibase

    INCLUDEPATH += c:/firebird_2.5/WOW64/lib

    win32:INCLUDEPATH += C:/Firebird_2_5/include
    win32:LIBS += -lfbclient_ms
    win32:LIBS += -LC:/Firebird_2_5/WOW64/lib

    unix:!contains( LIBS, .gds. ):!contains( LIBS, .libfb. ):LIBS *= -lgds

    win32:!contains( LIBS, .gds. ):!contains( LIBS, .fbclient. ) {
    !win32-borland:LIBS *= -lgds32_ms
    win32-borland:LIBS += gds32.lib
    }

    include(../qsqldriverbase.pri)

    HEADERS +=
    ../../../sql/drivers/ibase/qsql_ibase_p.h

    SOURCES +=
    ../../../sql/drivers/ibase/qsql_ibase.cpp



  • Hello,

    I've recently built two versions of ibase (for firebird) driver.
    Most helpful was entry on QT documentation and lqsa answer posted above.

    I was having troubles with make command, giving me missing ibase.h file.
    I've changed to things: reinstalled firebird to the folder where path does not include any spaces and have changed all "" to "/" (i had "" because i was copying my paths from explorer window). Now it works perfectly.

    If you are in need to re-compile driver for newer version of firebird be sure to delete a content from sqldrivers/ibase folder (it was previously created for another version of firebird).

    Hope that will help someone.
    CHers


Log in to reply
 

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