Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT and GDAL linking issue



  • i am having a trouble with linking GDAL (compiled with MSVc2017 ; X64) with QT (using as well the MSVC 2017),after adding the gdal_i.lib in the external libraries (using the Qt GUI) and having this code in the .pro file :
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    win32:CONFIG(release, debug|release): LIBS += -LR:/Lib_vc15/GDAL/lib/ -lgdal_i
    else:win32:CONFIG(debug, debug|release): LIBS += -LR:/Lib_vc15/GDAL/lib/ -lgdal_id
    else:unix:!macx: LIBS += -LR:/Lib_vc15/GDAL/lib/ -lgdal_i
    INCLUDEPATH += R:/Lib_vc15/GDAL/include
    DEPENDPATH += R:/Lib_vc15/GDAL/include
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    i still have this error while building the project

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    the error :LINK : fatal error LNK1104: cannot open file 'gdal_id.lib'
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    anyone has a recommendation ?


  • Lifetime Qt Champion

    Hi,

    Something strange here, you added gdal_i yet you have an error about gdal_id. Is it a typo ? If not, did you make a debug build of that library ?



  • hi all thank zou for participating , actually when creating the project there was a checkbox for the prefixes , by creating a new project and un-checking that the problem was solved


Log in to reply