Ununtu 16 04交叉編譯移植qt5 9 4

2021-10-24 21:17:46 字數 3521 閱讀 3772

tar vxf qt-everywhere-opensource-src-5.9.4.tar

cd qt-everywhere-opensource-src-5.9.4

vim qtbase/mkspecs/linux-aarch64-gnu-g++/qmake.conf
1 #

2 # qmake configuration for building with aarch64-linux-gnu-g++

3 #4

5 makefile_generator = unix

6 config += incremental

7 qmake_incremental_style = sublib

8 9 include(

../common/linux.conf)

10 include(

../common/gcc-base-unix.conf)

11 include(

../common/g++-unix.conf)

12 13 # modifications to g++.conf

14 qmake_cc = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-gcc

15 qmake_cxx = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-g++

16 qmake_link = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-g++

17 qmake_link_shlib = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-g++

18 19 # modifications to linux.conf

20 qmake_ar = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-ar cqs

21 qmake_objcopy = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-objcopy

22 qmake_nm = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-nm -p

23 qmake_strip = /media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-strip

24 load(qt_config)

修改14-23行的內容,改為自己相對應的交叉編譯器絕對路徑,最好是絕對路徑

執行./configure進行對應的配置,可以用./confgure --help檢視。

./configure -v --prefix=

$pwd/qt5 -release -make libs -xplatform linux-aarch64-gnu-g++ -optimized-qmake -pch -qt-zlib -no-opengl -no-sse2 -no-openssl -no-cups -no-separate-debug-info -nomake examples -nomake tools -device-option cross_compile=/media/u260510/47037fce-de1d-40bd-8cd8-922f0e1edc8e/rk_docs/rk1808/buildroot/output/rockchip_rk1808/host/usr/bin/aarch64-buildroot-linux-gnu-

安裝路徑用–prefix=引數自己指定。cross_compile引數是自己編譯器的絕對路徑。

make
make

install

安裝完成後會在你的安裝目錄下看到以下檔案:

bin  doc  include  lib  mkspecs  plugins  qml  translations
將安裝目錄下的include、 lib、 plugins複製到開發板/opt/qt5目錄下(**注意:**這是我自己的目錄,可以根據自己的實際情況進行修改)

vi /etc/profile
export qt_root=/opt/qt5

export tslib_root=/opt/tslib

export ld_library_path=/opt/qt5/lib:$ld_libaray_path

export qt_qpa_platform_plugin_path=

$qt_root/plugins

export qt_qpa_platform=linuxfb:tty=/dev/fb0

export qt_qpa_fontdir=

$qt_root/lib/fonts

export ld_preload=/usr/lib/preloadable_libiconv.so:$tslib_root/lib/libts.so

export qt_qpa_generic_plugins=/opt/tslib

移植qt之交叉編譯tslib 1 4

export prefix path to your tslib 1.4 dir export cc path to your cross compiler bin dir autogen.sh is an important sh file,it produce configure file ac...

madplay移植 交叉編譯

移植madplay 需要如下檔案 madplay 0.15.2b.tar.gz libmad 0.15.1b.tar.gz libid3tag 0.15.1b.tar.gz 和zlib 1.2.3.tar.gz。zlib 1.1.4.tar.gz zlib 1.2.3.tar.gz類似 1 配置編譯...

交叉編譯QT

qt x11 opensource src 4.4.3.tar.gz,qt embedded linux opensource src 4.4.3.tar.gz,arm linux gcc 3.4.1.tar.bz2 編譯環境 centos 4.4,gcc version 3.4.6 2006040...