/****************************************************************************** * Qt 5.8 移植编译、测试 * 说明: * 仅仅记录了编译的命令,没有详细的解释,参考文档链接中有详细的解释。 * * 2017-7-6 深圳 龙华樟坑村 曾剑锋 *****************************************************************************/ 一、参考文档: 1. Qt5.7.0编译移植到Linux-Arm-A9 https://my.oschina.net/u/938455/blog/474516 2. qt-5.6.0 移植之qt源码编译 http://www.cnblogs.com/chenfulin5/p/5798764.html 3. qt-5.6.0 移植之tslib 配置及编译 http://www.cnblogs.com/chenfulin5/p/5801604.html 二、compiler configure export PATH=$PATH:/home/zengjf/zengjfos/output/host/opt/ext-toolchain/bin: 三、compile tslib 1.4 ./autogen.sh echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache ./configure --host=arm-linux --prefix=`pwd`/_install CC=arm-none-linux-gnueabi-gcc --cache-file=arm-linux.cache make && make install 四、compile Qt 5.8 1. cat qtbase/mkspecs/linux-arm-none-gnueabi-g++/qmake.conf # # qmake configuration for building with arm-linux-gnueabi-g++ # MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) # modifications to g++.conf # arm-none-linux-gnueabi-g++ QMAKE_CC = arm-none-linux-gnueabi-gcc QMAKE_CXX = arm-none-linux-gnueabi-g++ QMAKE_LINK = arm-none-linux-gnueabi-g++ QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++ # modifications to linux.conf QMAKE_AR = arm-none-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy QMAKE_NM = arm-none-linux-gnueabi-nm -P QMAKE_STRIP = arm-none-linux-gnueabi-strip load(qt_config) 2. ./configure -release \ -opensource \ -confirm-license \ -xplatform linux-arm-none-gnueabi-g++ \ -prefix /home/zengjf/zengjfos/Qt5.8/QtLibOut \ -nomake examples \ -no-opengl \ -no-iconv \ -silent \ -qpa linuxfb \ -no-gtk \ -qt-libjpeg \ -qt-libpng \ -tslib \ -I/home/zengjf/zengjfos/Qt5.8/tslib-1.4/_install/include \ -L/home/zengjf/zengjfos/Qt5.8/tslib-1.4/_install/lib 五、lib使用环境变量: 1. 拷贝前面编译的lib库到ARM文件系统中; 2. 配置lib库环境变量: # tslib and qt configure export TSLIBDIR=/usr/share/tslib export TSLIB_CONSOLEDEVICE=none export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=$TSLIBDIR/etc/ts.conf export TSLIB_PLUGINDIR=$TSLIBDIR/lib/ts export TSLIB_CALIBFILE=/etc/pointercal export QTDIR=/usr/share/qt export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 export QT_QPA_FONTDIR=$QTDIR/lib/fonts export QT_QPA_GENERIC_PLUGINS=tslib:$TSLIB_TSDEVICE export QT_DEBUG_PLUGINS=1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:$TSLIBDIR/lib:$QTDIR/lib export PATH=$PATH:/usr/bin:$TSLIBDIR/bin:/usr/sbin:/bin
时间: 2024-10-29 12:18:39