Trying to build "quazip" library. But have only unresolved external symbols.
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 -= gui
The 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
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
SOURCES += $$PWD/qioapi.cpp
INSTALLS += headers target
workaround 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.
What are the missing symbols ?
adler32, crc32, gzdopen, gzread, gzwrite etc... Everything from zdll.lib.
What version of Qt are you currently using ?
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.