如何在Windows 7上构建Quazip 0.5.1?

LVr*_*reg 6 qt quazip

我正在尝试在安装了Qt 5.0.1 32位LGPL的Windows 7(32位)上构建quazip库(版本0.5.1).

当我在Qt-Commandprompt中运行时:

qmake
mingw32-make
Run Code Online (Sandbox Code Playgroud)

将目录设置为我提取Quazip的文件夹(C:\ Qt\quazip-0.5.1\quazip),我得到以下错误日志:

C:\Qt\quazip-0.5.1\quazip>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'C:/Qt/quazip-0.5.1/quazip'
g++ -Wl,-s -shared -mthreads -Wl,--out-implib,release\libquazip.a -o release\qua
zip.dll object_script.quazip.Release  -LC:\Qt\Qt5\5.0.1\mingw47_32\lib -lQt5Core
./release\unzip.o:unzip.c:(.text+0x1008): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x10aa): undefined reference to `inflate'
./release\unzip.o:unzip.c:(.text+0x10da): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x1110): undefined reference to `crc32'
./release\unzip.o:unzip.c:(.text+0x1327): undefined reference to `inflateEnd'
./release\unzip.o:unzip.c:(.text+0x1727): undefined reference to `get_crc_table'
./release\unzip.o:unzip.c:(.text+0x186f): undefined reference to `inflateInit2_'
./release\zip.o:zip.c:(.text+0xac7): undefined reference to `crc32'
./release\zip.o:zip.c:(.text+0xb7c): undefined reference to `deflate'
./release\zip.o:zip.c:(.text+0xcdf): undefined reference to `deflate'
./release\zip.o:zip.c:(.text+0xef5): undefined reference to `deflateEnd'
./release\zip.o:zip.c:(.text+0x13a8): undefined reference to `get_crc_table'
./release\zip.o:zip.c:(.text+0x1af9): undefined reference to `deflateInit2_'
./release\quaadler32.o:quaadler32.cpp:(.text+0x2e): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0x61): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0xa1): undefined reference to `adle
r32'
./release\quaadler32.o:quaadler32.cpp:(.text+0xb1): undefined reference to `adle
r32'
c:/qt/qt5/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64
-mingw32/bin/ld.exe: ./release\quaadler32.o: bad reloc address 0x0 in section `.
rdata$_ZTI13QuaChecksum32[__ZTI13QuaChecksum32]'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:106: recipe for target 'release\quazip.dll' failed
mingw32-make[1]: *** [release\quazip.dll] Error 1
mingw32-make[1]: Leaving directory 'C:/Qt/quazip-0.5.1/quazip'
makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
Run Code Online (Sandbox Code Playgroud)

但是在我的Zlib文件夹(C:\ Qt\Qt5\5.0.1\Src\qtbase\src\3rdparty\zlib)中安装了所有这些列出的文件.

.

当我试图解决问题时,我已经添加到quazip.pro并进入quazip.pri:

INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
Run Code Online (Sandbox Code Playgroud)

,它是如何建议在这里.

到目前为止,我在Google上找到的所有其他解决方案都无济于事.

我希望你们中的某些人可以帮助我.

问候,LVreg

IlB*_*dus 1

以下是对我有用的内容(Windows 7 上的 QuaZip 0.7,使用 MSVC13 32 位编译):

在命令行中输入:

SET INCLUDE=<PathToZib\include>;%INCLUDE%
SET LIB=<PathToZib\lib>;%LIB%
qmake PREFIX=<FolderWhereInstallWillPutFiles> LIBS+=<PathToZib\lib>/zdll.lib
nmake
nmake install
Run Code Online (Sandbox Code Playgroud)

<> 之间的所有内容都必须更改为您适用的路径

注意:在 LIBS+= 部分中使用 / 而不是 \ 作为文件夹分隔符