移植QT4.8.7
- 系统环境:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
2.平台:
linux 3.4.39
3.下载源码:
源码地址:https://www.qt.io/download/
4.编译
vi mkspecs/qws/linux-arm-g++/qmake.conf
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = arm-linux-gnueabi-gcc
QMAKE_CXX = arm-linux-gnueabi-g++
QMAKE_LINK = arm-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
QMAKE_STRIP = arm-linux-gnueabi-strip
load(qt_config)
export PATH=/opt/allwiner_compiler/external-toolchain/bin:${PATH}
./configure -prefix /home/xiao/Public/qt4.8.7_a23 -shared -release -opensource -little-endian -embedded arm -no-qt3support -xplatform qws/linux-arm-g++
make && make install
5.配置环境变量
export QTDIR=/home/xiao/Public/qt4.8.7_a23
export PATH=
export MANPATH=
export LD_LIBRARY_PATH=
export QMAKESPEC=${QTDIR}/mkspecs/linux-arm-gnueabi-g++
5.设备端环境变量
export QTDIR=/usr/local/qt4.8.5-arm
LD_LIBRARY_PATH=
export QT_QWS_FONTDIR=$QTDIR/lib/fonts
6.跑测试历程
cd affine/
./affine -qws