Cannot compile quazip 0.7.3 with Qt 5.10.1 MinGW
Solved
3rd Party Software
-
I am trying to compile the Quazip project version 0.7.3 with Qt 5.10.1 MinGW 32 bits on Windows, but I get the following errors :
./debug\quaadler32.o: In function `ZN10QuaAdler329calculateERK10QByteArray': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaadler32.cpp:37: undefined reference to `adler32' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaadler32.cpp:37: undefined reference to `adler32' ./debug\quaadler32.o: In function `ZN10QuaAdler325resetEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaadler32.cpp:42: undefined reference to `adler32' ./debug\quaadler32.o: In function `ZN10QuaAdler326updateERK10QByteArray': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaadler32.cpp:47: undefined reference to `adler32' ./debug\quacrc32.o: In function `ZN8QuaCrc329calculateERK10QByteArray': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quacrc32.cpp:36: undefined reference to `crc32' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quacrc32.cpp:36: undefined reference to `crc32' ./debug\quacrc32.o: In function `ZN8QuaCrc325resetEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quacrc32.cpp:41: undefined reference to `crc32' ./debug\quacrc32.o: In function `ZN8QuaCrc326updateERK10QByteArray': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quacrc32.cpp:46: undefined reference to `crc32' ./debug\quagzipfile.o: In function `ZN18QuaGzipFilePrivate4openERK7QStringPKc': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:45: undefined reference to `gzopen' ./debug\quagzipfile.o: In function `ZN18QuaGzipFilePrivate4openEiPKc': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:50: undefined reference to `gzdopen' ./debug\quagzipfile.o: In function `ZN11QuaGzipFile5flushEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:149: undefined reference to `gzflush' ./debug\quagzipfile.o: In function `ZN11QuaGzipFile5closeEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:155: undefined reference to `gzclose' ./debug\quagzipfile.o: In function `ZN11QuaGzipFile8readDataEPcx': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:160: undefined reference to `gzread' ./debug\quagzipfile.o: In function `ZN11QuaGzipFile9writeDataEPKcx': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quagzipfile.cpp:167: undefined reference to `gzwrite' ./debug\quaziodevice.o: In function `ZN12QuaZIODevice4openE6QFlagsIN9QIODevice12OpenModeFlagEE': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:157: undefined reference to `inflateInit_' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:163: undefined reference to `deflateInit_' ./debug\quaziodevice.o: In function `ZN12QuaZIODevice5closeEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:174: undefined reference to `inflateEnd' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:180: undefined reference to `deflateEnd' ./debug\quaziodevice.o: In function `ZN12QuaZIODevice8readDataEPcx': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:208: undefined reference to `inflate' ./debug\quaziodevice.o: In function `ZN12QuaZIODevice9writeDataEPKcx': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:264: undefined reference to `deflate' ./debug\quaziodevice.o: In function `ZN12QuaZIODevice5flushEv': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/quaziodevice.cpp:300: undefined reference to `deflate' ./debug\unzip.o: In function `unzOpenCurrentFile3': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:1592: undefined reference to `inflateInit2_' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:1627: undefined reference to `get_crc_table' ./debug\unzip.o: In function `unzReadCurrentFile': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:1792: undefined reference to `crc32' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:1856: undefined reference to `inflate' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:1867: undefined reference to `crc32' ./debug\unzip.o: In function `unzCloseCurrentFile': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/unzip.c:2030: undefined reference to `inflateEnd' ./debug\zip.o: In function `zipOpenNewFileInZip4_64': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1259: undefined reference to `deflateInit2_' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1287: undefined reference to `get_crc_table' ./debug\zip.o: In function `zipWriteInFileInZip': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1454: undefined reference to `crc32' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1513: undefined reference to `deflate' ./debug\zip.o: In function `zipCloseFileInZipRaw64': D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1577: undefined reference to `deflate' D:\EVAL 4dev\EVAL_4dev_Client\Phenix\build-quazip-Desktop-Debug\quazip/../../quazip-0.7.3/quazip/zip.c:1619: undefined reference to `deflateEnd' collect2.exe: error: ld returned 1 exit status mingw32-make[2]: *** [debug\quazipd.dll] Error 1 mingw32-make[1]: *** [debug] Error 2 mingw32-make: *** [sub-quazip-make_first] Error 2
When I Ctrl+click on an undefined function like adler32 it points to C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include
It seems that I need to link with the zlib.dll but I don't find it in Qt directories... and I have read that in Qt 5.10.1 it is integrated in QtCore.dll -
Yes I use the builtin Qt zlib
Thank you @ambershark I have added the following line in the quazip project .pro :
LIBS += -lz
Now I can compile it.