我需要在里面创建一个带有位图的简单.zip文件。我正在使用Qt,所以我希望我使用的库尽可能与Qt类似。谷歌搜索了一段时间后,我确信QuaZip是一个完美的解决方案。但我无法安装它,可能是因为我的机器是Windows。在QuaZip SourceForge页面上,只有下载源。下载后,我尝试在quazip-0.3目录中的Qt命令提示符下运行qmake和mingw32-make。这是输出:
Z:\quazip-0.3>mingw32-make
cd quazip\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `Z:/quazip-0.3/quazip'
mingw32-make -f Makefile.Debug
mingw32-make[2]: Entering directory `Z:/quazip-0.3/quazip'
gcc -c -g -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_THR
EAD_SUPPORT -I"c:\Qt\2010.05\qt\include\QtCore" -I"c:\Qt\2010.05\qt\include" -I"
." -I"c:\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2010.05\qt\mkspecs\w
in32-g++" -o debug\ioapi.o ioapi.c
ioapi.c:13:18: error: zlib.h: No such file or directory
In file included from ioapi.c:14:
ioapi.h:38: error: expected declaration specifiers or '...' before '*' token
ioapi.h:38: error: function definition declared 'typedef'
ioapi.h:38: warning: return type defaults to 'int'
ioapi.h: In function 'voidpf':
ioapi.h:38: error: expected declaration specifiers before 'OF'
ioapi.h:39: error: expected declaration specifiers or '...' before '*' token
ioapi.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
ioapi.h:40: error: expected declaration specifiers or '...' before '*' token
ioapi.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
ioapi.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
ioapi.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
ioapi.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
现在,行“ioapi.c:13:18:错误:zlib.h:没有这样的文件或目录”有点意味着缺少zlib。但是不应该将zlib包含在Qt中吗? Qt取决于zlib,不是吗?