我已經手動安裝了Qt Open source 4.8.3
庫,用於Windows上Windows 8 Pro x64
,Qt Creator 2.6.0
和MingW 4.4.0
。從Qt Creator我已經設置了工具包和編譯器。我打開了Qt Creator隨附的模擬時鐘示例並重建項目。以下錯誤是由編譯器發出的。如何解決mingw32-make.exe退出代碼2錯誤?
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 ++ ...'命令,並查看它給您帶來的錯誤?它看起來像make沒有給你任何有用的東西。 – Xymostech
輸出目錄(即'release'目錄)是否存在於預期位置? –
@Xymostech:當我試圖運行g ++時,系統錯誤提示找不到「libgmp-3.dll」。我搜索了MinwG,發現libgmp-10.dll。我想我需要安裝舊版本的libgmp? – Donotalo