移植QT4.8.7

前端之家收集整理的这篇文章主要介绍了移植QT4.8.7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

移植QT4.8.7

  1. 系统环境:
    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= QTDIR@H_403_76@/bin: PATH
export MANPATH= QTDIR/man: MANPATH
export LD_LIBRARY_PATH= QTDIR/lib: LD_LIBRARY_PATH
export QMAKESPEC=${QTDIR}/mkspecs/linux-arm-gnueabi-g++

5.设备端环境变量
export QTDIR=/usr/local/qt4.8.5-arm
LD_LIBRARY_PATH= QTDIR/lib: LD_LIBRARY_PATH
export QT_QWS_FONTDIR=$QTDIR/lib/fonts

6.跑测试历程
cd affine/
./affine -qws

参考网址:
http://www.cnblogs.com/findumars/p/5860590.html

原文链接:https://www.f2er.com/ubuntu/355889.html

猜你在找的Ubuntu相关文章