移植Qt4.7到友善之臂mini6410开发板全过程

pc系统:ubuntu14.04

材料:qt-everywhere-opensource-src-4.7.0.tar.gz

交叉编译环境:arm-linux-gcc

首先在/opt路径下创建mini6410文件夹

cd /opt

mkdir mini6410

然后将qt-everywhere-opensource-src-4.7.0.tar.gz拷贝到mini6410文件夹中

再解压

cd /opt/mini6410


tar xvzf /opt/qt-everywhere-opensource-src-4.7.0.tar.gz


最重要的一步:修改编译器路径:


cd qt-everywhere-opensource-src-4.7.0/mkspecs/qws/linux-arm-g++/

vim qmake.comf

修改
# modifications to g++.conf
QMAKE_CC                =arm-linux-gcc
QMAKE_CXX               =arm-linux-g++
QMAKE_LINK              =arm-linux-g++
QMAKE_LINK_SHLIB        =arm-linux-g++


# modifications to g++.conf
QMAKE_CC                =/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc
QMAKE_CXX               =/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++
QMAKE_LINK              =/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++
QMAKE_LINK_SHLIB        =/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++

最后再执行:

cd /opt/mini6410/qt-everywhere-opensource-src-4.7.0

make && make install


等待编译完成

你可能感兴趣的:(qtcreator)