Trying to build "quazip" library. But have only unresolved external symbols.
-
Greetings,
I need to compress/uncompress files and want to use "quazip library":http://quazip.sourceforge.net/. But I can't build it. I removed all unimportant stuff and here's my *.pro file:
@TEMPLATE = lib
CONFIG += qt warn_on
QT -= guiThe ABI version.
!win32:VERSION = 1.0.0
This one handles dllimport/dllexport directives.
DEFINES += QUAZIP_BUILD
You'll need to define this one manually if using a build system other
than qmake or using QuaZIP sources directly in your project.
CONFIG(staticlib): DEFINES += QUAZIP_STATIC
Input
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
HEADERS +=
$$PWD/crypt.h
$$PWD/ioapi.h
$$PWD/JlCompress.h
$$PWD/quaadler32.h
$$PWD/quachecksum32.h
$$PWD/quacrc32.h
$$PWD/quagzipfile.h
$$PWD/quaziodevice.h
$$PWD/quazipdir.h
$$PWD/quazipfile.h
$$PWD/quazipfileinfo.h
$$PWD/quazip_global.h
$$PWD/quazip.h
$$PWD/quazipnewinfo.h
$$PWD/unzip.h
$$PWD/zip.hSOURCES += $$PWD/qioapi.cpp
$$PWD/JlCompress.cpp
$$PWD/quaadler32.cpp
$$PWD/quacrc32.cpp
$$PWD/quagzipfile.cpp
$$PWD/quaziodevice.cpp
$$PWD/quazip.cpp
$$PWD/quazipdir.cpp
$$PWD/quazipfile.cpp
$$PWD/quazipfileinfo.cpp
$$PWD/quazipnewinfo.cpp
$$PWD/unzip.c
$$PWD/zip.cheaders.path=$$PREFIX/include/quazip
headers.files=$$HEADERS
target.path=$$PREFIX/lib
INSTALLS += headers targetworkaround for qdatetime.h macro bug
DEFINES += NOMINMAX
LIBS += -L$$PWD/../../../zliblibs/ -lzdll
INCLUDEPATH += $$PWD/../../../zliblibs
DEPENDPATH += $$PWD/../../../zliblibs@.../zliblibs/ path contain headers, .lib and .dll. But building a project fails due to a bunch of unresolved external symbols. The paths are correct, I added them with "Add Library..." option. Also .lib have this symbols - I tried an example with visual studio and it works. I'm using Qt Creator 3.3, Win7.
-
Hi,
What are the missing symbols ?
-
SGaist,
adler32, crc32, gzdopen, gzread, gzwrite etc... Everything from zdll.lib.
-
What version of Qt are you currently using ?
-
SGaist,
Qt 5.4.0.After a lot of searches and tries I found that adding
@INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib@solves my problem. Now I wonder - why?
I found that zlib headers are part of Qt. Also Qt5Core.dll have zlib symbols so there's no need to add zlib library to quazip. But, Qt's zlib version is 1.2.5 while the latest official version is 1.2.8.
When I try to include latest headers and latest lib I have this error and I can't understand why.