本文介绍了如何解决mingw32-make.exe退出与代码2错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已安装 Qt开源4.8.3 Windows上的库 Windows 8 Pro x64 Qt Creator 2.6.0 MingW 4.4.0 手动。从Qt Creator我有安装工具包和编译器。我打开模拟时钟示例自带Qt Creator并重建项目。编译器发出以下错误。

I've installed Qt Open source 4.8.3 library for Windows on Windows 8 Pro x64, Qt Creator 2.6.0 and MingW 4.4.0 manually. From Qt Creator I've setup kits and compilers. I opened the analog clock example comes along with Qt Creator and rebuild the project. The following error are emitted by the compiler.

Running steps for project analogclock...

Starting: "C:\Qt\4.8.3\bin\qmake.exe" C:\Qt\4.8.3\examples\widgets\analogclock\analogclock.pro -r -spec win32-g++

The process "C:\Qt\4.8.3\bin\qmake.exe" exited normally.

Starting: "C:\MingW\bin\mingw32-make.exe"

C:/MingW/bin/mingw32-make -f Makefile.Release

mingw32-make[1]: Entering directory `C:/Qt/4.8.3/examples/widgets/analogclock-build-Desktop-Release'

g++ -c -O2 -Wall -Wextra -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I"..\..\..\include\QtCore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQt" -I"release" -I"..\analogclock" -I"." -I"..\..\..\mkspecs\win32-g++" -o release\analogclock.o **..\analogclock\analogclock.cpp**

mingw32-make[1]: Leaving directory `C:/Qt/4.8.3/examples/widgets/analogclock-build-Desktop-Release'

mingw32-make[1]: *** [release/analogclock.o] Error 1

mingw32-make: *** [release] Error 2

The process "C:\MingW\bin\mingw32-make.exe" exited with code 2.

Error while building/deploying project analogclock (target: Desktop)

When executing step 'Make'

我已验证 C:/Qt/4.8.3/examples/widgets/analogclock/analogclock。 cpp 存在。

为什么会出现此错误,如何解决?

Why is this error occurring and how can i fix it?

推荐答案

似乎你的g ++安装不干净,所以编译器不能启动(这也是你在评论中说的)。尝试重新安装,然后你可以尝试构建一个hello world程序来验证是否可以运行g ++。此外,请验证您的PATH变量已正确配置为mingw。

It seems your installation of g++ is not clean, so the compiler cannot be launched (this is also what you've said in the comments). Try reinstall, and then you can try to build a hello world program to verify whether you can run g++. Also, please verify that your PATH variable is properly configured for mingw.

这篇关于如何解决mingw32-make.exe退出与代码2错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 07:50