首页| 论坛| 消息

标题:QT4.4的Hello qt的范例程序,但编译通不过,求高人帮帮我~!
作者:oneke
日期:2008-08-29 11:39
内容:

程序如下:
#include "include/QtGui/qapplication.h"
#include "include/QtGui/qpushbutton.h"
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QPushButton hello("Hello world!");
hello.resize(100,30);
hello.show();
return app.exec();
}
经典的Hello程序~,但make却通不过,提示
$ make
mipsel-linux-g++ -o test test.o -L/qt-3.3/lib -lqt-mt -lXext -lX11 -lm
/home/oneke/tools/mipseltools-gcc412-lnx26/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../mipsel-linux/bin/ld: skipping incompatible /usr/lib/qt-3.3/lib/libqt-mt.so when searching for -lqt-mt
/home/oneke/tools/mipseltools-gcc412-lnx26/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../mipsel-linux/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
make: *** Error 1
不知道是什么原因,而且那个/qt-3.3/lib -lqt-mt -lXext 不知道是怎么来的,我的环境变量没有设置这个
有高人可以帮我解决一下吗?不胜感激!!


#1 [nmiirq 08-29 12:59]
环境变量没有设置好吧,-L/qt-3.3/lib 这个还是3.3的
#2 [oneke 08-29 14:45]
找到了,qt-3.3是PC上Linux系统上的,应该与目标板无关
#3 [llcwzg 08-30 06:13]
QT4下头文件应该是
#include
#include
注意lib的路径要加到环境变量,你的就是linker出错
#4 [奋斗 09-09 08:59]
可以直接修改makefile,加上库文件的路径就可以了

回复 发表
主题 版块