linux qtopia-2.2.0编译,Qtopia free 2.2.0 交叉编译详细过程(二) [zt]

Qtopia free 2.2.0 交叉编译详细过程(二) [zt]

Qtopia free 2.2.0 交叉编译详细过程(二)http://www.arm9bbs.com/thread-335-1-1.html

Qtopia free 2.2.0交叉编译详细过程(二)

作者:李德

网名:leander

Email:mailtolide@sina.com

时间:2007-1-24

(5)make

make的过程中会出现一些错误,下面是我出现的错误和相应的解决办法,希望对你有用:

错误一:

/home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qt2/include/qvaluestack.h:57:错误:不能从             ‘QValueListIterator >’             转换到             ‘const char*’,为实参             ‘1’(属于             ‘int remove(const char*)’)

解决办法:

//       remove( this->fromLast() );

this->remove(this->fromLast() );

错误二:

jpeglib.h错误

解决办法:

原因是在$MYHOME/nfs/qtopia-free-2.2.0/qtopia/src/3rdparty/plugins/codecs/libflash

中有一个jpeglib.h,但是它不是我们需要的,我们需要的已经拷贝在/home/qtopia-arm-home/arm/include中了,所以将其改名:

cd $MYHOME/nfs/qtopia-free-2.2.0/qtopia/src/3rdparty/plugins/codecs/libflash

mv jpeglib.h jpeglib.h.bak

编译成功了可以再该回来。

错误三:

/usr/local/arm/2.95.3/arm-linux/bin/ld:cannot find -ljpeg

解决办法:

拷贝libjpeg.a到arm/lib

错误四:

In file included fromvideocaptureview.cpp:54:

/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/sys-include/linux/videodev.h:5:linux/version.h: ?????????

make[6]: ***[.obj/release-shared/videocaptureview.o] 错误 1

解决办法:

在./usr/local/arm/2.95.3/arm-linux/sys-include/linux/videodev.h. 文件中把#include一行屏蔽

错误五:

/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libuuid.so.1, needed by /home/q topia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqpe.so,not found (try using   -rpath or-rpath-link)

/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libts-0.0.so.0, needed by /home /qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try usin g -rpath or -rpath-link)

/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libpng12.so.0, needed by /home/ qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try using   -rpath or-rpath-link)

/usr/local/arm/2.95.3/arm-linux/bin/ld:warning: libz.so.1, needed by /home/qtop ia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so,not found (try using -rp ath or -rpath-link)

/home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/lib/libqte.so:undefined refe rence to `uncompress'

解决办法:

是编译没带库编译了qmake 工具没生成

我是修改文件

/qtopia-free-2.2.0/qtopia/mkspecs/qws/linux-arm-g++/qmake.conf

将此行

QMAKE_LIBS_QT = -lqte

修改为

QMAKE_LIBS_QT = -lqte -lpng -lts -lz -luuid-ljpeg

参考

http://www.qtopia.org.cn/phpBB2/viewtopic.php?p=2560&sid=069a3e6e76d5327ef97f9ea1a22ff481

错误六:

../../libraries/qtopia/qdawg.cpp:294: 错误:有多余的限定             ‘QDawgPrivate::’             在成员             ‘QDawgPrivate’             上

make[6]: *** [.obj/release-shared/qdawg.o] 错误 1

make[5]: *** [all] 错误 2

make[4]: *** [sub-tools-qdawggen] 错误 2

make[3]: *** [sub-src-components_pro] 错误 2

make[2]: *** [all] 错误 2

make[1]: *** [all] 错误 2

解决办法:

vi /home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp

//   QDawgPrivate::~QDawgPrivate()

~QDawgPrivate()

终于编译成功啦!!!庆贺一下,请我吃饭,哈哈!

(5)将编译成功后的库拷贝到前面指定的安装目录:

makeinstall

命令结束后可以在$MYHOME/nfs/qtopia中看到qtopia的文件系统。

4. 收尾:

别忘了,还有一些库在$MYHOME/arm/lib中,拷贝这些库到qtopia的库中:

cp$MYHOME/arm/lib/* $MYHOME/nfs/qtopia/lib/

如果是用了tslib,还需要拷贝触摸屏校准/测试程序以及相关的库文件:

mkdir$MYHOME/nfs/qtopia/bin/tests

mkdir$MYHOME/nfs/qtopia/lib/ts

cp $MYHOME/arm/tslib/tests/.libs/ts_*$MYHOME/nfs/qtopia/bin/tests

cp$MYHOME/arm/tslib/src/.libs/libts-0.0.so.0* $MYHOME/nfs/qtopia/lib

cp$MYHOME/arm/tslib/src/.libs/libts.so $MYHOME/nfs/qtopia/lib

cp$MYHOME/arm/tslib/plugins/.libs/*.so $MYHOME/nfs/qtopia/lib/ts/

5. 运行:

在你的板子上设置运行环境变量

exportPATH=/bin:/sbin:/usr/bin:/usr/sbin:/qt/bin

exportLD_LIBRARY_PATH=/lib:/usr/lib:/qt/lib

export QWS_KEYBOARD=TTY

export LANG=zh_CN

export TERMINFO_DIRS=/usr/etc

export ROOT=/root

export QTDIR=/qt

export QPEDIR=/qt

exportQWS_MOUSE_PROTO=TPanel:/dev/h3600_tsraw

如果是用了tslib,还需要设置以下环境变量:

export TSLIB_TSDEVICE=/dev/h3600_tsraw

export TSLIB_CONSOLEDEVICE=/dev/vc/

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_CONFFILE=/qt/etc/ts.conf

export TSLIB_PLUGINDIR=$QTDIR/lib/ts/

export TSLIB_TSEVENTTYPE="H3600"

校准屏幕(5点校准)

如果是用tslib,启动下面的程序校准触摸屏:

通过nfs将/home/qtopia-arm-home/nfs挂载到你的板子,然后在你的板子上执行:

cd到你的qtopia/bin/tests

./ts_calibrate

运行

cd到你的qtopia/bin

./qpe

6. 说明:文中的牵扯路径大致如下:

MYHOME=/home/qtopia-arm-home

PATH=$PATH:/usr/local/arm/2.95.3/bin

$MYHOME-->

arm-->

lib

include

e2fs

jpeg

libpng

tslib

zlib

nfs-->

qtopia

qtopia-free-2.2.0-->

...

dqt

qtopia

qt2

...

7. 参考文档:

Qtopia   PDA 2.2.2             交叉编译过程 By nanfansky@163.com 2006-12-10

©著作权归作者所有:来自51CTO博客作者3444542的原创作品,如需转载,请注明出处,否则将追究法律责任

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值