Qt Creator项目构建错误

时间:2009-11-22 15:57:40

标签: qt qt4 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'

请帮帮我......

感谢。

1 个答案:

答案 0 :(得分:2)

  

无法找到-lQtDBus

QtDBus模块是仅限Unix的库。从理论上讲,可以编译winDBus然后编译QtDBus for Windows。但这并不容易,我不确定MinGW ......