簡體   English   中英

QTCreator無法構建(Windows x64,MinGW)

[英]QTCreator Not Building (Windows x64, MinGW)

嘗試使用QTCreater構建應用程序時遇到問題。

這是我得到的錯誤:

QT編譯輸出:

12:40:01: Running steps for project untitled2...
12:40:01: Starting: "C:\Qt\4.8.5\bin\qmake.exe" C:\Users\user\Desktop\untitled2\untitled2.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
12:40:01: The process "C:\Qt\4.8.5\bin\qmake.exe" exited normally.
12:40:01: Starting: "C:\MinGW-back\bin\mingw32-make.exe" 
C:/MinGW-back/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Users/user/Desktop/build-untitled2-Unnamed-Debug'
c:\Qt\4.8.5\bin\uic.exe ..\untitled2\mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.8.5\include\QtCore" -I"..\..\..\..\Qt\4.8.5\include\QtGui" -I"..\..\..\..\Qt\4.8.5\include" -I"..\..\..\..\Qt\4.8.5\include\ActiveQt" -I"debug" -I"." -I"..\untitled2" -I"." -I"..\..\..\..\Qt\4.8.5\mkspecs\win32-g++" -o debug\main.o ..\untitled2\main.cpp
g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.8.5\include\QtCore" -I"..\..\..\..\Qt\4.8.5\include\QtGui" -I"..\..\..\..\Qt\4.8.5\include" -I"..\..\..\..\Qt\4.8.5\include\ActiveQt" -I"debug" -I"." -I"..\untitled2" -I"." -I"..\..\..\..\Qt\4.8.5\mkspecs\win32-g++" -o debug\mainwindow.o ..\untitled2\mainwindow.cpp
C:\Qt\4.8.5\bin\moc.exe -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.8.5\include\QtCore" -I"..\..\..\..\Qt\4.8.5\include\QtGui" -I"..\..\..\..\Qt\4.8.5\include" -I"..\..\..\..\Qt\4.8.5\include\ActiveQt" -I"debug" -I"." -I"..\untitled2" -I"." -I"..\..\..\..\Qt\4.8.5\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\untitled2\mainwindow.h -o debug\moc_mainwindow.cpp
g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\4.8.5\include\QtCore" -I"..\..\..\..\Qt\4.8.5\include\QtGui" -I"..\..\..\..\Qt\4.8.5\include" -I"..\..\..\..\Qt\4.8.5\include\ActiveQt" -I"debug" -I"." -I"..\untitled2" -I"." -I"..\..\..\..\Qt\4.8.5\mkspecs\win32-g++" -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp
g++ -mthreads -Wl,-subsystem,windows -o debug\untitled2.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o  -L"c:\Qt\4.8.5\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4 
c:\Qt\4.8.5\lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
c:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Resume'
c:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Resume'
c:\Qt\4.8.5\lib/libqtmaind.a(qtmain_win.o): In function `ZN7QVectorIPcE7reallocEii':
c:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:512: undefined reference to `_Unwind_Resume'
c:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:513: undefined reference to `_Unwind_Resume'
c:\Qt\4.8.5\lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [debug\untitled2.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Users/user/Desktop/build-untitled2-Unnamed-Debug'
mingw32-make: *** [debug] Error 2
12:40:07: The process "C:\MinGW-back\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project untitled2 (kit: Unnamed)
When executing step 'Make'
12:40:07: Elapsed time: 00:07.

我正在使用從Windows的Qt庫4.8.5下載的QT 4.8.5 (minGW 4.4,317 MB)

我正在使用從安裝Codeblocks MinGW獲得的MinGW

請幫忙。 為Windows設置QTCreator如此痛苦。

編輯:解決方案是使用MinGW 4.4,我在這里找到: https : //docs.google.com/file/d/0B4D8x6CJEmtuczdiQklwMEs4RUU/edit

您必須使用Qt隨附的MinGW-w64工具鏈來鏈接到Qt庫。 或使用工具鏈自己重建Qt,對於4.8而言,它的痛苦不如對5.x的痛苦。

所鏈接的編譯器版本之間的ABI不同,並且沒有使它們兼容的方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM