gpt4 book ai didi

c++ - 如何解决 mingw32-make.exe exited with code 2 错误?

转载 作者:行者123 更新时间:2023-11-30 02:58:49 25 4
gpt4 key购买 nike

我已经在 Windows 8 Pro x64Qt Creator 2.6.0 上安装了适用于 Windows 的 Qt Open source 4.8.3 库code>MingW 4.4.0 手动。从 Qt Creator 我有设置工具包和编译器。我打开了 Qt Creator 附带的模拟时钟示例并重建了项目。编译器发出以下错误。

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 存在。此外,这个项目自带Qt安装,我没有做任何改变。

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

最佳答案

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

关于c++ - 如何解决 mingw32-make.exe exited with code 2 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13442233/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com