Quazip not building up: Throwing "Undefined symbols for architecture x86_64"
-
It means that this library can't be built on your system.
-
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!
-
You're welcome - that's what these forums have been made for :-)
-
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 !
-
Thanks, Volker, for the information about needing to add "LIBS += -lz". That worked perfectly, and saved me a lot of time!
-
Thank you Volker
-
Thank you Wolker this help me too. I'm fresh on Mac and some erro messages get me on the wrong way
-
Thank you Wolker this help me too. I'm fresh on Mac and some erro messages get me on the wrong way
-
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?
-
This post is deleted! -
@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.