QT5.5.1编译 移植到arm
1.配置交叉编译环境变量
gedit ~/.bashrc
export PATH=$PATH:/opt/ROM-3420BSP/cross_compiler/fsl-linaro-toolchain/bin
2.让环境变量生效
source ~/.bashrc
查看
echo $PATH
3.解压
tar -zxvf qt-everywhere-opensource-src-5.5.1.tar.gz
4.到解压目录
cd qt-everywhere-opensource-src-5.5.1
5.修改配置文件
gedit ./qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
#
# qmake configuration for building with arm-fsl-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)
QT_QPA_DEFAULT_PLATFORM = linux #eglfs
QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a
# modifications to g++.conf
QMAKE_CC = arm-fsl-linux-gnueabi-gcc
QMAKE_CXX = arm-fsl-linux-gnueabi-g++
QMAKE_LINK = arm-fsl-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-fsl-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-fsl-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-fsl-linux-gnueabi-objcopy
QMAKE_NM = arm-fsl-linux-gnueabi-nm -P
QMAKE_STRIP = arm-fsl-linux-gnueabi-strip
load(qt_config)
6.注销3d
gedit qt.pro
注释掉
addModule(qt3d, qtdeclarative qtimageformats)
addModule(qtcanvas3d, qtdeclarative)
7.创建安装目录
mkdir /opt/ROM-3420BSP/qt/install_dir_arm
8.配置
./configure -release -opensource -xplatform linux-arm-gnueabi-g++ -prefix /opt/ROM-3420BSP/qt/install_dir_arm -no-c++11 -no-opengl
9.编译 安装
make && make install
10.参考
//http://my.oschina.net/u/1177171/blog/502319?p={{page}}