交叉编译Qt-4.8.5


一.tslib和qt下载路径:
百度云下载地址: http://pan.baidu.com/s/1kTNFA
将tslib-1.4.tar.gz和qt-everywhere-opensource-src-4.8.5.tar.gz放到/root/qt-arm  (视个人情况而定, 以下操作是以/root/qt-arm为例)
# cp tslib-1.4.tar.gz qt-everywhere-opensource-src-4.8.5.tar.gz /root/qt-arm


二.tslib编译与安装
首先需要检查一下软件是否安装
sudo apt-get install automake
sudo apt-get install autogen
sudo apt-get install autoconf
确定以上工具都已经安装后,解压安装即可。
# tar -zxvf tslib-1.4.tar.gz
# cd tslib
# ./autogen.sh
# mkdir tslib-1.4-arm-release
# ./configure --prefix=/root/qt-arm/tslib/tslib-1.4-arm-release --host=arm-linux ac_cv_func_malloc_0_nonnull=yes
# make
# make install

将tslib库中的so全部拷贝到qt-4.8.5/lib中
# cp /root/qt-arm/tslib/tslib-1.4-arm-release/lib/* /root/qt-arm/qt-everywhere-opensource-src-4.8.5/lib


三.编译Qt-4.8.5
# cd qt-everywhere-opensource-src-4.8.5
# ./configure -v -prefix /usr/local/Trolltech/Qt-4.8.5/arm -opensource -confirm-license -embedded arm -release -shared -fast -no-largefile -qt-sql-sqlite -qt3support -no-xmlpatterns -no-glib -no-phonon -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libjpeg -make libs -make tools -make translations -no-nis -no-cups -iconv -no-dbus -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 16,24,32 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-kbd-qvfb -armfpa -no-mouse-qvfb -qt-mouse-linuxtp -qt-mouse-tslib -DQT_QLOCALE_USES_FCVT -I/root/qt-arm/tslib/tslib-1.4-arm-release/include -L/root/qt-arm/tslib/tslib-1.4-arm-release/lib 
# make 
# make install


四.交叉编译一个demo工程
# cd demo
# /usr/local/Trolltech/Qt-4.8.5/arm/bin/qmake -project
# /usr/local/Trolltech/Qt-4.8.5/arm/bin/qmake demo.pro
# make

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// 编译PC
./configure -v -confirm-license -opensource -prefix /usr/local/Trolltech/Qt-4.8.5/pc -dbus-linked -openssl-linked -plugin-sql-sqlite -no-phonon -no-phonon-backend -no-nis -no-openvg -optimized-qmake -opengl -make libs -make tools -make examples -make demos -make docs -make translations -fontconfig -gtkstyle 



你可能感兴趣的:(嵌入式)