全部博文(198)
分类: 嵌入式
2014-08-20 17:06:36
1 、编译嵌入式arm版(需要 arm-linux-gcc 的支持)
将 qt-everywhere-opensource-src-4.8.2.tar.gz 压缩包解压 arm 版本。
把编译器路径加入系统环境变量,运行命令:export PATH=/usr/local/arm/gnueabi-4.4.4/bin:$PATH
在指定的安装目录下生成/bin /etc /lib /include文件夹,并放入相应的文件。如果相应的文件夹已经在,则把相应的文件放入对应的文件夹。
2、QT配置与编译
./configure -prefix /rootfs/qts/qt-4.8.2 \
-opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast \
-optimized-qmake -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian \
-qt-gfx-transformed -qt-gfx-linuxfb -qt-kbd-linuxinput\
-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 \
-D__ARM_ARCH_5TEJ__ -qt-mouse-tslib \
-I /newsdisk/zjp/a8-linux/rootfs/qts/tslib/include \
-L /newsdisk/zjp/a8-linux/rootfs/qts/tslib/lib
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /rootfs/qts/qt-4.8.2
To reconfigure, run 'make confclean' and 'configure'.
选项说明:
让qt支持旋转,在编译嵌入式qt库的时候加上-qt-gfx-transformed和-qt-gfx-linuxfb选项。
编译,会提示几个错误
lib/libQtGui.so:undefinedreferenceto`ts_read_raw'
/lib/libQtGui.so:undefinedreferenceto`ts_open'
/lib/libQtGui.so:undefinedreferenceto`ts_fd'
/lib/libQtGui.so:undefinedreferenceto`ts_config'
/lib/libQtGui.so:undefinedreferenceto`ts_close'
/lib/libQtGui.so:undefinedreferenceto`ts_read
修改qt-everywhere-opensource-src-4.8.2/mkspecs/qws/linux-arm-g++/qmake.conf
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lts