简单记录过程:
1,下载qt-everywhere-opensource-src-5.6.3源码,地址:http://download.qt.io/archive/qt/
2,下载arm-linux-4.4.3的交叉编译器,地址:https://download.csdn.net/download/immortal018/10421132
3,设置编译器或者说平台。通过xplatform参数指定编译器,xplatform后面跟的参数实际上即是qtbase/mkspec
下的文件夹的名字,修改该文件夹下的qmake.conf
,修改后的内容如下所示:(path为自己存放交叉编译器4.4.3的具体路径)
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QT_QPA_DEFAULT_PLATFORM = linuxfb
QMAKE_CFLAGS_RELEASE +=-O2 -march=armv7-a
QMAKE_CXXFLAGS_RELEASE +=-O2 -march=armv7-a
include(../common/linux.con