0
我獲得Qt Creator中構建一個項目時出現以下錯誤:Qt Creator的項目生成錯誤
**error: collect2: ld returned 1 exit status**
以下是編譯輸出
**Running build steps for project mw_fe...**
Starting: F:/Qt/2009.04/qt/bin/qmake.exe C:/Documents and Settings/Administrator/My Documents/mw_fe/mw_fe.pro -spec win32-g++ -r CONFIG+=release
Exited with code 0.
Starting: F:/Qt/2009.04/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `C:/Documents and Settings/Administrator/My Documents/mw_fe'
F:/Qt/2009.04/mingw/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Documents and Settings/Administrator/My Documents/mw_fe'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,console -o release\mw_fe.exe release/main.o release/mamewah.o release/moc_mamewah.o -L"f:\Qt\2009.04\qt\lib" -lQtDBus -lQtTest4 -lQtScript4 -lQtXmlPatterns4 -lQtXml4 -lQtGui4 -lQtCore4
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Administrator/My Documents/mw_fe'
mingw32-make: Leaving directory `C:/Documents and Settings/Administrator/My Documents/mw_fe'
f:\Qt\2009.04\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lQtDBus
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\mw_fe.exe] Error 1
mingw32-make: *** [release] Error 2
Exited with code 2.
Error while building project mw_fe
When executing build step 'Make'
請幫我...
謝謝。
賓果。解決方法是從.pro文件中刪除dbus模塊。打開它並從QT + =行中刪除'dbus',或者在文件中添加另一行讀取'QT - = dbus'的行。 kemiisto,你可以編輯你的答案來包含這個信息嗎? – 2009-11-22 16:28:11
@ Mihai Limbasan但是如果項目真的需要QtDBus呢? – Wildcat 2009-11-22 16:34:48
非常感謝大家......問題解決了...... – MA1 2009-11-22 16:54:29