ARM platform: Beaglebone Black
Compiling platform: ubuntu16.04
Cross-compilation tool: ARM-LINUX-GNUEABIHF
QT Source: qt-everywhere-opensource-src-5.8.0.tar.gz
Set ARM-LINUX-GNUEABIHF path
~$ Vim ~/.BASHRC
Add the following line to the file
Export path= $PATH: ~/gcc-linaro-4.9-arm-linux-gnueabihf/bin
Save and exit file, refresh
~$ Source ~/.BASHRC
configure and compile QT modifying QT Support ARM-LINUX-GNUEABIHF cross-compilation tools
~$ TAR-XZF qt-everywhere-opensource-src-5.8.0.tar.gz
~$ cd qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs
~/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs$ cp-r linux-arm-gnueabi-g++/linux-arm-gnueabihf-g++
~/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/linux-arm-gnueabihf-g++$ Vim qmake.conf
Replace the Arm-linux-gnueabi in the file with ARM-LINUX-GNUEABIHF, as follows
# #
Qmake configuration for building with arm-linux-gnueabihf-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
qmake_cc = ARM-LINUX-GNUEABIHF-GCC
qmake_ CXX = arm-linux-gnueabihf-g++
qmake_link = arm-linux-gnueabihf-g++
qmake_link_shlib = arm-linux-gnueabihf-g++
# Modifications to linux.conf
qmake_ar = Arm-linux-gnueabihf-ar
CQS Qmake_objcopy = arm-linux-gnueabihf-objcopy
qmake_nm = arm-linux-gnueabihf-nm-p
Qmake_strip = Arm-linux-gnueabihf-strip
load (qt_config)
Configuring QT
~/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/linux-arm-gnueabihf-g++$ CD ~/ qt-everywhere-opensource-src-5.8.0
~/qt-everywhere-opensource-src-5.8.0$./configure-prefix $PWD/qtbase- Opensource-xplatform linux-arm-gnueabihf-g++-no-opengl-nomake Examples
compiling QT
~/qt-everywhere-opensource-src-5.8.0$ Make-j4
After compiling the qmake path within the QT Creator, you can use the