首页| 论坛| 消息

标题:【提问】请教一个qt程序的编译问题
作者:baker0611
日期:2006-03-16 22:23
内容:

#include
#include
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
在dev-c++中编译的:
undefined reference to `_imp___ZN12QApplicationC1ERiPPc'
undefined reference to `_imp___ZN11QPushButtonC1ERK7QStringP7QWidget'
undefined reference to `_imp___ZN12QApplication4execEv'
一串类似的错误提示,我搞了半天也不知道是哪里的问题。


#1 [XChinux 03-16 22:25]
不要在DevCpp中编译,要想用它编译,需要设置许多东西的。头文件,库,编译方式等。
用Qt Command Prompt编译。

回复 发表
主题 版块