菜鸟紧急求助,qt2.2.0窗口程序移植不了啊?
交叉编译环境已经搭建好,用arm-linux-gcc hello.c -o helloc编译的程序可以在开发板上面运行,用arm-linux-g++ hello.cpp -o hellocpp编译的程序也可以在开发板上面运行,其中两个文件内容如下:hello.c
#include <stdio.h>
int main()
{
printf("feiyangqingyun\n");
}
hello.cpp
#include <iostream>
using namespace std;
int main()
{
cout <<"feiyangqingyun111"<<endl;
return 0;
}
编译光盘中附带的serial.c,需要修改ttySAC0为ttyS0,编译成功,运行OK!
但是按照运行tmake hello.pro -o Makefile生成了Makefile文件,然后运行make命令,确生成不了可执行文件,报错make:Nothing to be done for "all",都搞了一个多礼拜了还是移植不了QT窗口程序,源码如下:
#include <qapplication.h>
#include <qlabel.h>
int main(int argc,char **argv)
{
int result=0;
QApplication app(argc,argv);
QLabel *label=new QLabel("feiyangqingyun",NULL);
label->setGeometry(10,10,200,80);
app.setMainWidget(label);
label->show();
result=app.exec();
return result;
}
试了很多方法,几乎崩溃,希望有好心人可以传一份QT2.2.0程序移植的步骤,网上找了很多,还有手写makefile文件都试过了,依然不行,那本开发板配套教程上面很多地方有问题! 环境变量设置如下:
export PATH=/usr/local/arm/2.95.3/bin:/root/yizhi/qtopia-free-2.2.0/qtopia/bin:/root/yizhi/qtopia-free-2.2.0/qt2/bin:/root/yizhi/qtopia-free-2.2.0/tmake/bin:$PATH
export QTDIR=/root/yizhi/qtopia-free-2.2.0/qt2
export QPEDIR=/root/yizhi/qtopia-free-2.2.0/qtopia/
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH$QTDIR:/root/yizhi/qtopia-free-2.2.0/qt2/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH$QTDIR:/root/yizhi/qtopia-free-2.2.0/qtopia/lib"
export CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
export TMAKEDIR=/root/yizhi/qtopia-free-2.2.0/tmake
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++ :'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'( 参考下6410下的视频呢?
http://bbs.witech.com.cn/thread-3809-1-1.html
页:
[1]