Ibase SQL plugin build error on Windows 10 / MSVC 2017 64 bits for Firebird 3



  • How compile the ibase SQL plugin for Fireberid 3 on Windows 10, MSVC 2017 64 bits?

    Firebird is installed on D:\Firebird.

    Executing this:

    C:\Qt\5.9.2\msvc2017_64\bin\qmake "INCLUDEPATH+=D:/Firebird/include" "LIBS+=-lfbclient" ibase.pro
    

    on C:\Qt\5.9.2\Src\qtbase\src\plugins\sqldrivers\ibase

    Appears:

    Project ERROR: Library 'ibase' is not defined.
    

    After read this post: https://forum.qt.io/topic/75419/ibase-sql-plugin-build-error, I've commented QMAKE_USE += ibase on ibase.pro, but gives this error:

    Cannot read C:/Qt/5.9.2/Src/qtbase/src/plugins/sqldrivers/qtsqldrivers-config.pri
    

    This file doesn't exist. So, I've commented include($$shadowed($$PWD)/qtsqldrivers-config.pri) on qsqldriverbase.pri.

    Now qmake finish ok.

    When try to run nmake, it isn't found on the path, so I've executed this bat: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"

    After do:

    cd C:\Qt\5.9.2\Src\qtbase\src\plugins\sqldrivers\ibase
    nmake
    

    appears a link error:

    Utilidad de mantenimiento de programas de Microsoft (R) versión 14.11.25508.2
    (C) Microsoft Corporation. Todos los derechos reservados.
    
            "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\nmake.exe" -f Makefile.Release all
    
    Utilidad de mantenimiento de programas de Microsoft (R) versión 14.11.25508.2
    (C) Microsoft Corporation. Todos los derechos reservados.
    
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.9 /OUT:..\plugins\sqldrivers\qsqlibase.dll @C:\Users\mabg\AppData\Local\Temp\nm4CA6.tmp
    LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'fbclient.lib'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\link.EXE"' : código devuelto '0x49d'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\nmake.exe"' : código devuelto '0x2'
    Stop.
    

    fbclient.lib doesn't exist, what can I do now?


  • Lifetime Qt Champion

    Hi,

    IIRC you have to configure Qt once and then you should be able to build the driver.



  • @SGaist How configure QT? I'm not compiling QT, I've installed QT with the installer.


  • Lifetime Qt Champion

    I didn't say you had to compile Qt, just configure it using the configure.bat script.



  • @SGaist After run configure.bat, I've run again nmake, but appears the same error.


  • Moderators

    @lqsa "LIBS+=-lfbclient" - this is not enough, you need to tell the linker where it is located:

    LIBS+="-LPATH_WHERE_LIB_IS_LOCATED -lfbclient"
    


  • @jsulm It works! Thank you very much!.

    Just say that fbclient.lib doesn't exist on Firebird, but it exists fbclient_ms.lib. Finally LIBS is: LIBS+="-LD:/Firebird/lib -lfbclient_ms"


Log in to reply
 

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