4.5.1移植到QQ2440开发板(2)

#make install-strip //生成瘦身应用程序和库

编译qt-x11-opensource-src-4.5.1-arm

进入/usr/local/qt/qt-x11-opensource-src-4.5.1-arm目录,进行编译安装。在终端中进行如下操作:

./configure "

-release "

-shared "

-fast "

-no-largefile "

-qt-sql-sqlite "

-no-qt3support "

-no-xmlpatterns "

-no-mmx "

-no-3dnow "

-no-sse "

-no-sse2 "

-no-svg "

-no-webkit "

-qt-zlib "

-qt-gif "

-qt-libtiff "

-qt-libpng "

-qt-libmng "

-qt-libjpeg "

-make libs "

-nomake tools "

-nomake examples "

-nomake docs "

-nomake demo "

-no-nis "

-no-cups "

-no-iconv "

-no-dbus "

-no-openssl "

-xplatform qws/linux-arm-g++ "

-embedded arm "

-little-endian "

-qt-freetype "

-depths 16,18 "

-qt-gfx-linuxfb "

-no-gfx-transformed "

-no-gfx-multiscreen "

-no-gfx-vnc "

-no-gfx-qvfb "

-qt-kbd-usb "

-no-glib "

-qt-mouse-tslib -I/home/cnnbboy/opt/include -L/home/cnnbboy/opt/lib

之所以裁剪那么多参数,是因为开发版空间有限,只要完成我所需要的功能就可以了,之后配置环境变量,我的配置如下:

export QTDIR=/qq2440

export T_ROOT=/tslib

export PATH=$QTDIR/bin:$PATH

export TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_TSDEVICE=/dev/input/event0

export TSLIB_PLUGINDIR=$T_ROOT/lib/ts

export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf

export TSLIB_CALIBFILE=/etc/pointercal

export QWS_MOUSE_PROTO=tslib:/dev/input/event0

export LD_LIBRARY_PATH=$T_ROOT/lib:$QTDIR/lib

最后,运行qt的测试程序成功,移植OK了。

出现的问题:

运行测试程序中说缺少librt.so.1 ,libstdc++.so.6 ,libgcc_s.so.1这三个文件,这是因为交叉编译的环境不同,从主机上的拷贝过去即可。还提示找不到字体,是因为编译时没有设定安装目录,在板子上建立一个连接就可以了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwszxj.html