Quazip not building up: Throwing "Undefined symbols for architecture x86_64"
-
The error means that the linker is trying to find the code for some symbols, but fails to do so. The lib (zlib) is installed on your system, otherwise the compiler would have bailed out already (due to missing include files). Fortunately the solution is easy: The developers forgot to include linkage to zlib in the .pro file, so just add to the file mvim quazip/quazip.pro the following line in the unix scope:
@
LIBS += -lz
@The complete snippet that works for me (I had the very same errors on a 10.6 Mac box) is:
@
unix:!symbian {
headers.path=$$PREFIX/include/quazip
headers.files=$$HEADERS
target.path=$$PREFIX/lib
INSTALLS += headers target
// the following line needs to be added
LIBS += -lzOBJECTS_DIR=.obj
MOC_DIR=.moc}
@ -
Volker, you just saved me after a weekend of pain ... was having exactly the same issue, couldn't figure it out.
Was even considering completely different approaches ... thank you so much!
-
Hi,Volker. I'm a novice in using Qt creator. I have the same problem which confused me for two days. Thank you so much for your answer. Thank you !
-
Hi , please anybody can help me, how to solve this issue when I'm using CMake and not qmake?
-
@Leanor This is quite old thread. Please provide more information about your situation:
- What OS?
- What Qt version?
- What exact error messages do you get?
-
@Leanor Seems like you do not link the quazip libs.
Show your pro file.Also
#include <QuaZip-Qt5-1.3/quazip/quazip.h>this should look differently:
#include <quazip/quazip.h>just add QuaZip-Qt5-1.3 as include path in your pro file.