I'm trying to build the quazip libary (version 0.5.1) on Windows 7 (32-bit) with Qt 5.0.1 32-Bit LGPL installed.
我试图在安装了Qt 5.0.1 32位LGPL的Windows 7(32位)上构建quazip libary(版本0.5.1)。
When i run in the Qt-Commandprompt:
当我在Qt-Commandprompt中运行时:
qmake
mingw32-make
with the directory set to the folder in which I extracted Quazip (C:\Qt\quazip-0.5.1\quazip), I get the following error-log:
将目录设置为提取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
But in my Zlib-Folder (C:\Qt\Qt5\5.0.1\Src\qtbase\src\3rdparty\zlib) are all this listed files installed.
但是在我的zlib - folder (C:\Qt\Qt5\5.0.1\Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ Src\ 3rrc \ \ \ \ \ \ \ \ \ \ \3rdparty\zlib)中)中)中,这些文件都已经安装好了。
.
。
As I tried to solve the problem, I have added into the quazip.pro and into the quazip.pri:
当我试图解决这个问题时,我加入了quazip。赞成加入魁地奇。pri:
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
, how it is suggested here.
,如何建议。
All other solutiuons I have found on Google so far aren't helping.
到目前为止,我在谷歌上发现的所有其他解子都不起作用。
I hope someone of you can help me.
我希望你们中有人能帮助我。
Greetings, LVreg
问候,LVreg
2 个解决方案
#1
3
The problem is that QuaZIP can not find the zlib library. You should include the path of the headers an also the libraries when you run qmake:
问题是,QuaZIP找不到zlib库。当你运行qmake时,你应该包括标题栏和库的路径:
qmake "INCLUDEPATH+=C:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib" "LIBS+=-LC:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib -lz"
mingw32-make
There is a full explanation in my blog if you want to check it out: http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/
在我的博客里有一个完整的解释,如果你想查看一下:http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping- with-qt/。
#2
1
Here is what worked for me (QuaZip 0.7 on Windows 7 compiled with MSVC13 32 bits):
以下是对我有用的东西(用MSVC13 32位编译的Windows 7上的QuaZip 0.7):
In the command line type:
在命令行类型中:
SET INCLUDE=<PathToZib\include>;%INCLUDE%
SET LIB=<PathToZib\lib>;%LIB%
qmake PREFIX=<FolderWhereInstallWillPutFiles> LIBS+=<PathToZib\lib>/zdll.lib
nmake
nmake install
everything between <> must be changed to your applicable path
必须将<>之间的所有内容更改为适用的路径
NOTE: in the LIBS+= part use / instead of \ as folders delimiter
注意:在LIBS+=部分使用/而不是作为文件夹分隔符
#1
3
The problem is that QuaZIP can not find the zlib library. You should include the path of the headers an also the libraries when you run qmake:
问题是,QuaZIP找不到zlib库。当你运行qmake时,你应该包括标题栏和库的路径:
qmake "INCLUDEPATH+=C:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib" "LIBS+=-LC:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib -lz"
mingw32-make
There is a full explanation in my blog if you want to check it out: http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/
在我的博客里有一个完整的解释,如果你想查看一下:http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping- with-qt/。
#2
1
Here is what worked for me (QuaZip 0.7 on Windows 7 compiled with MSVC13 32 bits):
以下是对我有用的东西(用MSVC13 32位编译的Windows 7上的QuaZip 0.7):
In the command line type:
在命令行类型中:
SET INCLUDE=<PathToZib\include>;%INCLUDE%
SET LIB=<PathToZib\lib>;%LIB%
qmake PREFIX=<FolderWhereInstallWillPutFiles> LIBS+=<PathToZib\lib>/zdll.lib
nmake
nmake install
everything between <> must be changed to your applicable path
必须将<>之间的所有内容更改为适用的路径
NOTE: in the LIBS+= part use / instead of \ as folders delimiter
注意:在LIBS+=部分使用/而不是作为文件夹分隔符