
qt编写程序执行make时出现错误
qmake-project和qmakehelloqt.pro都没有问题就是一个最基本的helloqt的显示框,结果make的时候就报错,不知道为什么,源码:#includ...
qmake -project和qmake helloqt.pro都没有问题
就是一个最基本的helloqt的显示框,结果make的时候就报错,不知道为什么,源码:
#include<QApplication>
#include<QLabel>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QLabel *label=new QLabel("hello qt!");
label->show();
return app.exec();
}
编译信息
D:\programming\program\helloqt>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/programming/program/helloqt'
g++ -mthreads -Wl,-subsystem,windows -o debug\helloqt.exe debug/main.o -L"c:\Qt
SDK\Desktop\Qt\4.8.1\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text+0x64):../..
/include/QtCore/../../src/corelib/tools/qvector.h:424: undefined reference to `_
Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text+0x12a):c:\i
wmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined reference
to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVector
IPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1a1):../../include/QtCore/.
./../src/corelib/tools/qvector.h:512: undefined reference to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVector
IPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1dc):../../include/QtCore/.
./../src/corelib/tools/qvector.h:513: undefined reference to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.eh_frame+0x12):
In function `Z4qMinIiERKT_S2_S2_':
../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:95: undefined refer
ence to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\helloqt.exe] Error 1
mingw32-make[1]: Leaving directory `D:/programming/program/helloqt'
mingw32-make: *** [debug] Error 2 展开
就是一个最基本的helloqt的显示框,结果make的时候就报错,不知道为什么,源码:
#include<QApplication>
#include<QLabel>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QLabel *label=new QLabel("hello qt!");
label->show();
return app.exec();
}
编译信息
D:\programming\program\helloqt>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/programming/program/helloqt'
g++ -mthreads -Wl,-subsystem,windows -o debug\helloqt.exe debug/main.o -L"c:\Qt
SDK\Desktop\Qt\4.8.1\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text+0x64):../..
/include/QtCore/../../src/corelib/tools/qvector.h:424: undefined reference to `_
Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text+0x12a):c:\i
wmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined reference
to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVector
IPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1a1):../../include/QtCore/.
./../src/corelib/tools/qvector.h:512: undefined reference to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.text$_ZN7QVector
IPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x1dc):../../include/QtCore/.
./../src/corelib/tools/qvector.h:513: undefined reference to `_Unwind_Resume'
c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib/libqtmaind.a(qtmain_win.o)(.eh_frame+0x12):
In function `Z4qMinIiERKT_S2_S2_':
../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:95: undefined refer
ence to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\helloqt.exe] Error 1
mingw32-make[1]: Leaving directory `D:/programming/program/helloqt'
mingw32-make: *** [debug] Error 2 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询