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
展开
 我来答
singolang
2012-05-03 · TA获得超过832个赞
知道小有建树答主
回答量:1505
采纳率:0%
帮助的人:810万
展开全部

环境变量没有配好吧。

刺泪晚远笔1L
2012-05-08 · TA获得超过161个赞
知道答主
回答量:124
采纳率:100%
帮助的人:87万
展开全部
错误信息里有很多undefined reference to,并且是qt自带的头文件里的,应该是qt没装好,重装qt吧,全部组件都安装,除非你有把握不装不会出错。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式