Quazip unresolved externals



  • Hello,

    When I try to build my project using quazip I get the following log:
    @
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QuaZip::QuaZip(class QIODevice *)" (_imp??0QuaZip@@QEAA@PEAVQIODevice@@@Z) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QuaZip::~QuaZip(void)" (_imp??1QuaZip@@QEAA@XZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl QuaZip::open(enum QuaZip::Mode,struct zlib_filefunc_def_s *)" (_imp?open@QuaZip@@QEAA_NW4Mode@1@PEAUzlib_filefunc_def_s@@@Z) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QuaZip::close(void)" (_imp?close@QuaZip@@QEAAXXZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl QuaZip::goToFirstFile(void)" (_imp?goToFirstFile@QuaZip@@QEAA_NXZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl QuaZip::goToNextFile(void)" (_imp?goToNextFile@QuaZip@@QEAA_NXZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QuaZipFile::QuaZipFile(class QuaZip *,class QObject *)" (_imp??0QuaZipFile@@QEAA@PEAVQuaZip@@PEAVQObject@@@Z) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QuaZipFile::~QuaZipFile(void)" (_imp??1QuaZipFile@@UEAA@XZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QuaZipFile::getActualFileName(void)const " (_imp?getActualFileName@QuaZipFile@@QEBA?AVQString@@XZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    jom: L:\Github\Testfighter\build-AutoUpdater-Desktop_Qt_5_3_MSVC2013_64bit-Release\Makefile.Release [release\AutoUpdater.exe] Error 1120
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual bool __cdecl QuaZipFile::open(class QFlags<enum QIODevice::OpenModeFlag>)" (_imp?open@QuaZipFile@@UEAA_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    updatingwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl QuaZipFile::close(void)" (_imp?close@QuaZipFile@@UEAAXXZ) referenced in function "private: void __cdecl UpdatingWindow::fileDownloaded(class QNetworkReply *)" (?fileDownloaded@UpdatingWindow@@AEAAXPEAVQNetworkReply@@@Z)
    release\AutoUpdater.exe : fatal error LNK1120: 11 unresolved externals
    jom: L:\Github\Testfighter\build-AutoUpdater-Desktop_Qt_5_3_MSVC2013_64bit-Release\Makefile [release] Error 2
    16:50:33: The process "E:\QT\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project AutoUpdater (kit: Desktop Qt 5.3 MSVC2013 64bit)
    When executing step 'Make'@

    I have tried everything (static, dynamic libraries, rebuilding every library, direct from source), nothing seems to work.

    Greetings,

    Leo


  • Lifetime Qt Champion

    Hi,

    Might be a silly question but: did you add the necessary lines in your project pro file to link to quazip ?



  • SGaist Yes I did:
    @unix|win32: LIBS += -L$$PWD/zlib/lib/ -lz

    INCLUDEPATH += $$PWD/zlib/include
    DEPENDPATH += $$PWD/zlib/include

    win32:!win32-g++: PRE_TARGETDEPS += $$PWD/zlib/lib/z.lib
    else:unix|win32-g++: PRE_TARGETDEPS += $$PWD/zlib/lib/libz.a

    unix|win32: LIBS += -L$$PWD/quazip/lib/ -lquazip

    INCLUDEPATH += $$PWD/quazip/include
    DEPENDPATH += $$PWD/quazip/include

    win32:!win32-g++: PRE_TARGETDEPS += $$PWD/quazip/lib/quazip.lib
    else:unix|win32-g++: PRE_TARGETDEPS += $$PWD/quazip/lib/libquazip.a@


  • Lifetime Qt Champion

    Ok, no error message about a missing lib ? QuaZip is also built with MSVC 2013 in 64 bit?


Log in to reply
 

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