首页| 论坛| 消息

标题:【提问】第一个程序出现错误!
作者:iamone
日期:2005-11-11 16:21
内容:

#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();
}
命令:
qmake -project
qmake
make
make的时候,出现一个错误:
C:\dev-cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:cannot find -lqtmaind
这个错误是怎么回事啊?
谢谢!


#1 [XChinux 11-11 16:27]
使用qmake release
进行编译。
qtmaind 是debug库。
默认是未编译过的。
你要编译成debug版的话,需要先编译Qt Debug Library,才能有qtmaind这个库。否则 ,只有qtmain这个release版链接使用的库。
#2 [XChinux 11-11 16:27]
错了,不是qmake release
是make release
#3 [iamone 11-11 16:34]
OK了!,非常感谢
#4 [neutaotao 11-18 14:28]
能不能说的详细一些啊》?
#5 [XChinux 11-18 14:30]
就是说,默认的mingw版的Qt安装的时候是只带release版库文件的,你只能进行release版编译,如果想编译 debug版进行调试的话,那就要先编译Qt Debug Library,这样才能生成那些libxxxd这样的库的,才能生成程序的debug版。

回复 发表
主题 版块