• 8165阅读
  • 2回复

在命令行下make时出错 [复制链接]

上一主题 下一主题
离线wangkunqcn
 
只看楼主 倒序阅读 楼主  发表于: 2009-12-03
刚刚安装了QT SDK for windows 2009.05,设置好path路径,在命令行编译时出错,不知什么原因?
J:\QtExsamples\qt-book\chap01\hello>make
make -f Makefile.Debug
make[1]: Entering directory `J:/QtExsamples/qt-book/chap01/hello'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
\..\..\Qt\2009.05\qt\include\QtCore" -I"..\..\..\..\Qt\2009.05\qt\include\QtGui"
-I"..\..\..\..\Qt\2009.05\qt\include" -I"." -I"..\..\..\..\Qt\2009.05\qt\includ
e\ActiveQt" -I"debug" -I"..\..\..\..\Qt\2009.05\qt\mkspecs\default" -o debug\hel
lo.o hello.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -mthreads -Wl -Wl,-subsystem,windows -o debug\hello.exe debug/hello.o  -L"j:\
Qt\2009.05\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
j:\Qt\2009.05\qt\lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Res
ume'
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Re
sume'
j:\Qt\2009.05\qt\lib/libqtmaind.a(qtmain_win.o):C:\qt-greenhouse\Trolltech\Code_
less_create_more\Trolltech\Code_less_create_more\Troll\4.6\qt\src\winmain/../../
include/QtCore/../../src/corelib/tools/qvector.h:481: undefined reference to `_U
nwind_Resume'
j:\Qt\2009.05\qt\lib/libqtmaind.a(qtmain_win.o):C:\qt-greenhouse\Trolltech\Code_
less_create_more\Trolltech\Code_less_create_more\Troll\4.6\qt\src\winmain/../../
include/QtCore/../../src/corelib/tools/qvector.h:482: undefined reference to `_U
nwind_Resume'
j:\Qt\2009.05\qt\lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12):
undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[1]: *** [debug\hello.exe] Error 1
make[1]: Leaving directory `J:/QtExsamples/qt-book/chap01/hello'
make: *** [debug] Error 2
离线wangkunqcn
只看该作者 1楼 发表于: 2009-12-03
已解决,就是设置几个环境变量,比如QTDIR、QMAKESPEC等,参考qt安装目录下的qt 命令提示符批处理文件。
离线yfx2003

只看该作者 2楼 发表于: 2010-03-26
建议楼上把自己的设置贴在这里

供后来人学习
www.qtcn.org/gpq4/
ajaxref.okajax.com/
快速回复
限100 字节
 
上一个 下一个