目标机是mini2440
一、下载qt Embedded 4.7.2的源码,从
http://qt.nokia.com上可获取
二、解压源代码包并进入相应目录,先进行配置,可写一个配置文件运行之以自动配置
如编写自动配置文件autoconfig.sh,内容如下:
#!/bin/bash
./configure \
-prefix /usr/local/qt-arm9-4.7.2 \
-opensource \
-confirm-license \
-release -shared \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24 \
-fast \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-qt-freetype \
-little-endian -host-little-endian \
-no-qt3support \
-no-libtiff -no-libmng \
-no-opengl \
-no-mmx -no-sse -no-sse2 \
-no-3dnow \
-no-openssl \
-no-webkit \
-no-qvfb \
-no-phonon \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender \
-no-separate-debug-info \
-nomake examples -nomake tools -nomake docs \
-qt-mouse-tslib \
-I/usr/local/tslib/include \
-L/usr/local/tslib/lib
以上配置项有些应根据需要选择,如要编写webkit的程序,则应将no-webkit去掉等。
保存文件。然后运行autoconfig.sh
[root@localhost qt4.7.2 ] # chmod a+x autoconfig.sh #加上可执行权限
[root@localhost qt4.7.2 ] # ./autoconfig.sh #自动配置生成Makefile文件
编译&安装
[root@localhost qt4.7.2 ] # make
[root@localhost qt4.7.2 ] # make install
编译时间可能较长
本文来自CSDN博客,转载请标明出处:
http://blog.csdn.net/homking/archive/2011/04/02/6299367.aspx