
qt使用make使报的错误,使用的例子是书上带的,实在是不明白,请哪位帮下忙,谢谢
mingw32-make-fMakefile.Debugmingw32-make[1]:Enteringdirectory`C:/DocumentsandSettings...
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Documents and Settings/Administrator/桌
面/hello'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
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.7.1\include\QtCore" -I"..\..\..\..\Qt\4.7.1\include\QtGui" -I"..\..\..\.
.\Qt\4.7.1\include" -I"." -I"..\..\..\..\Qt\4.7.1\include\ActiveQt" -I"debug" -I
"..\..\..\..\Qt\4.7.1\mkspecs\win32-g++" -o debug\hello.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"c:\
Qt\4.7.1\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libstdc++.a(eh_personality.o)
(.data$_ZTISt9exception+0x0): multiple definition of `typeinfo for std::exceptio
n'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o)(.rdata$_ZTISt9exception+0x0):../../in
clude/QtCore/../../src/corelib/global/qglobal.h:1112: first defined here
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libstdc++.a(eh_personality.o)
(.text$_ZTSSt9exception+0x0): multiple definition of `typeinfo name for std::exc
eption'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o)(.rdata$_ZTSSt9exception+0x0):qtmain_w
in.cpp: first defined here
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text+0x64):../../include/QtCore/..
/../src/corelib/tools/qvector.h:412: undefined reference to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text+0x12a):C:\\iwmake\\build_ming
w_opensource\\src\\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_R
esume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text$_ZN7QVectorIPcE7reallocEii+0x
1a1):../../include/QtCore/../../src/corelib/tools/qvector.h:484: undefined refer
ence to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text$_ZN7QVectorIPcE7reallocEii+0x
1dc):../../include/QtCore/../../src/corelib/tools/qvector.h:485: undefined refer
ence to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.eh_frame+0x12): In function `Z4qMi
nIiERKT_S2_S2_':
../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:95: undefined refer
ence to `__gxx_personality_v0'
mingw32-make[1]: *** [debug\hello.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Administrator/桌面
/hello'
mingw32-make: *** [debug] Error 2
路径不带汉字也不好使 展开
mingw32-make[1]: Entering directory `C:/Documents and Settings/Administrator/桌
面/hello'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
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.7.1\include\QtCore" -I"..\..\..\..\Qt\4.7.1\include\QtGui" -I"..\..\..\.
.\Qt\4.7.1\include" -I"." -I"..\..\..\..\Qt\4.7.1\include\ActiveQt" -I"debug" -I
"..\..\..\..\Qt\4.7.1\mkspecs\win32-g++" -o debug\hello.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"c:\
Qt\4.7.1\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libstdc++.a(eh_personality.o)
(.data$_ZTISt9exception+0x0): multiple definition of `typeinfo for std::exceptio
n'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o)(.rdata$_ZTISt9exception+0x0):../../in
clude/QtCore/../../src/corelib/global/qglobal.h:1112: first defined here
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libstdc++.a(eh_personality.o)
(.text$_ZTSSt9exception+0x0): multiple definition of `typeinfo name for std::exc
eption'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o)(.rdata$_ZTSSt9exception+0x0):qtmain_w
in.cpp: first defined here
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text+0x64):../../include/QtCore/..
/../src/corelib/tools/qvector.h:412: undefined reference to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text+0x12a):C:\\iwmake\\build_ming
w_opensource\\src\\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_R
esume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text$_ZN7QVectorIPcE7reallocEii+0x
1a1):../../include/QtCore/../../src/corelib/tools/qvector.h:484: undefined refer
ence to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.text$_ZN7QVectorIPcE7reallocEii+0x
1dc):../../include/QtCore/../../src/corelib/tools/qvector.h:485: undefined refer
ence to `_Unwind_Resume'
c:\Qt\4.7.1\lib/libqtmaind.a(qtmain_win.o.b)(.eh_frame+0x12): In function `Z4qMi
nIiERKT_S2_S2_':
../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:95: undefined refer
ence to `__gxx_personality_v0'
mingw32-make[1]: *** [debug\hello.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Administrator/桌面
/hello'
mingw32-make: *** [debug] Error 2
路径不带汉字也不好使 展开
展开全部
很明显,错误是 “multiple definition of `typeinfo name for std::exception'”,也就是对类型重复定义了,错误的起因可能是你的头文件的引用冲突了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询