quazip:Windows ming32w-make 错误

Posted

技术标签:

【中文标题】quazip:Windows ming32w-make 错误【英文标题】:quazip: windows ming32w-make error 【发布时间】:2015-02-05 04:14:09 【问题描述】:

我正在尝试使用 QT5.4 在 wdinwso 7 下编译 quazip 源代码。

我尝试在 VS 2013 下编译,但找不到 rc.exe 文件。我确保 rc.exe 和 dll 在 vs2013 和 vs2010 的 kits 和 SDK 文件夹中。

所以我跟着这个:http://www.maefloresta.com/portal/quazip

当我这样做时,我收到以下错误消息,并且不知道从哪里开始查找。

C:\development\QTCommon\quazip>mingw32-make
cd quazip\ && ( if not exist Makefile C:\development\QT\5.4\5.4\msvc2013_64\bin\
qmake.exe C:\development\QTCommon\quazip\quazip\quazip.pro -o Makefile ) && ming
w32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/development/QTCommon/quazip/quazip'
mingw32-make -f Makefile.Release
mingw32-make[2]: Entering directory 'C:/development/QTCommon/quazip/quazip'
cl -c -nologo -Zm200 -Zc:wchar_t -FS -O2 -MD -Zc:strictStrings -W3 -w34100 -w341
89 -GR -EHsc -DUNICODE -DWIN32 -DQUAZIP_BUILD -DNOMINMAX -DQT_NO_DEBUG -DQT_CORE
_LIB -DNDEBUG -I"." -I"C:\development\QT\5.4\5.4\msvc2013_64\Src\qtbase\src\3rdp
arty\zlib" -I"C:\development\QT\5.4\5.4\msvc2013_64\include" -I"C:\development\Q
T\5.4\5.4\msvc2013_64\include\QtCore" -I"release" -I"C:\development\QT\5.4\5.4\m
svc2013_64\mkspecs\win32-msvc2013" -Forelease\ @<<
<< was unexpected at this time.
Makefile.Release:116: recipe for target 'release.cpprelease\.obj' failed
mingw32-make[2]: *** [release.cpprelease\.obj] Error 255
mingw32-make[2]: Leaving directory 'C:/development/QTCommon/quazip/quazip'
Makefile:34: recipe for target 'release' failed
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory 'C:/development/QTCommon/quazip/quazip'
Makefile:41: recipe for target 'sub-quazip-make_first' failed
mingw32-make: *** [sub-quazip-make_first] Error 2

从 quazip 中找到的 makefile.release 行:

####### Implicit rules

.SUFFIXES: .c .cpp .cc .cxx

release.cpprelease\.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Forelease\ @<<
    $<
    <<

对于 make 或 vs 2013 问题,任何帮助都会很棒。

干杯。

【问题讨论】:

您的 mingw32-make 在 msvc2013 目录中查找。这是你的问题。如果您将使用 mingw 进行编译,则需要使用它的头文件和库。但是我不明白,你有没有单独安装mingw和Qt?编辑:如果是这样,您可能需要在 quazip.pro 中定义 include 和 lib 目录。 【参考方案1】:

如果您按照提供的链接 (http://www.maefloresta.com/portal/quazip) 中的说明进行操作,则问题的根源可能是因为您没有正确构建 QuaZIP 库,或者您的包含路径或库路径错误。

如果您想要一个关于如何在 Qt 中使用 QuaZIP 的完整示例,我建议您查看我的博客的这篇文章:http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/

【讨论】:

该示例在 Linux 环境中效果最佳。你的博客是一个更好的例子。 @Antonio Borondo @Arnej65,该示例在 Windows 和 Linux 环境中的工作方式相同。实际上,我博客中的示例是在 Windows 中运行的。两者之间的唯一区别应该是写入不同库的路径的格式。

以上是关于quazip:Windows ming32w-make 错误的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Windows 10 上将 Quazip 与 Qt 5.6、Qt Creator 一起使用?

Qt编译QuaZip的过程和使用踩坑--Win平台和Android平台编译

Qt编译QuaZip的过程和使用踩坑--Win平台和Android平台编译

QT学习_QT压缩文件ZIP编译

Linux QtCreator设置mingw编译器生成windows程序

Qt中用QuaZip来压缩和解压缩文件