• 8367阅读
  • 4回复

编译错误。请高手帮忙 [复制链接]

上一主题 下一主题
离线80520997
 

只看楼主 正序阅读 楼主  发表于: 2009-09-03
— 本帖被 XChinux 执行加亮操作(2010-09-10) —
mingw32-make debug
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Documents and Settings/Administrator/workspace/qttest'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\qttest.exe debug/main.o debug/qttest.o debug/moc_qttest.o  -L"d:\Qt\4.5.2\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
d:\Qt\4.5.2\lib/libqtmaind.a(qtmain_win.o): In function `WinMain':
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:91: undefined reference to `__gxx_personality_sj0'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:91: undefined reference to `_Unwind_SjLj_Register'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:140: undefined reference to `_Unwind_SjLj_Resume'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:140: undefined reference to `_Unwind_SjLj_Unregister'
collect2: ld returned 1 exit status
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Administrator/workspace/qttest'
mingw32-make[1]: *** [debug\qttest.exe] Error 1
mingw32-make: *** [debug] Error 2
离线小霸王
只看该作者 4楼 发表于: 2010-09-09
MD 我也遇到这个问题了...
离线80520997

只看该作者 3楼 发表于: 2009-09-03
没有人能帮我解答这个低级错误吗
离线80520997

只看该作者 2楼 发表于: 2009-09-03
引用第1楼jorneyr于2009-09-03 11:01发表的  :
`C:/Documents and Settings/Administrator/workspace/qttest'
这个路径中有空格。把工程目录放到没有空格的路径中试试



换了目录问题依旧存在啊。我有的是最新的mingw4.4,会不会和这个有关啊。我从网上搜了一下。有人说了没有链接到c++标准库


mingw32-make debug
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/qttest'
d:\Qt\4.5.2\bin\uic.exe test.ui -o ui_test.h
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\4.5.2\include\QtCore" -I"..\Qt\4.5.2\include\QtGui" -I"..\Qt\4.5.2\include" -I"..\Qt\4.5.2\include\ActiveQt" -I"debug" -I"." -I"..\Qt\4.5.2\mkspecs\default" -o debug\main.o main.cpp
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\4.5.2\include\QtCore" -I"..\Qt\4.5.2\include\QtGui" -I"..\Qt\4.5.2\include" -I"..\Qt\4.5.2\include\ActiveQt" -I"debug" -I"." -I"..\Qt\4.5.2\mkspecs\default" -o debug\test.o test.cpp
d:\Qt\4.5.2\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\Qt\4.5.2\include\QtCore" -I"..\Qt\4.5.2\include\QtGui" -I"..\Qt\4.5.2\include" -I"..\Qt\4.5.2\include\ActiveQt" -I"debug" -I"." -I"..\Qt\4.5.2\mkspecs\default" -D__GNUC__ -DWIN32 test.h -o debug\moc_test.cpp
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\4.5.2\include\QtCore" -I"..\Qt\4.5.2\include\QtGui" -I"..\Qt\4.5.2\include" -I"..\Qt\4.5.2\include\ActiveQt" -I"debug" -I"." -I"..\Qt\4.5.2\mkspecs\default" -o debug\moc_test.o debug\moc_test.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\test.exe debug/main.o debug/test.o debug/moc_test.o  -L"d:\Qt\4.5.2\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
d:\Qt\4.5.2\lib/libqtmaind.a(qtmain_win.o): In function `WinMain':
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:91: undefined reference to `__gxx_personality_sj0'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:91: undefined reference to `_Unwind_SjLj_Register'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:140: undefined reference to `_Unwind_SjLj_Resume'
C:/iwmake/build_mingw_opensource/src/winmain/qtmain_win.cpp:140: undefined reference to `_Unwind_SjLj_Unregister'
collect2: ld returned 1 exit status
mingw32-make[1]: Leaving directory `D:/qttest'
mingw32-make[1]: *** [debug\test.exe] Error 1
mingw32-make: *** [debug] Error 2
离线jorneyr

只看该作者 1楼 发表于: 2009-09-03
`C:/Documents and Settings/Administrator/workspace/qttest'
这个路径中有空格。把工程目录放到没有空格的路径中试试