赞
踩
主要参照以下两篇博文:
Jetson Xavier NX套件 Ubuntu 源码编译安装Qt5.15.6
JetsonNano QT5.12.9交叉编译和环境搭建
#!/bin/sh ./configure \ -platform linux-aarch64-gnu-g++ \ -prefix /opt/qt5.15.6_aarch64 \ -confirm-license \ -opensource \ -release \ -shared \ -make libs \ -nomake examples \ -nomake tests \ -opengl \ -pch \ -qt-libjpeg \ -qt-libpng \ -qt-zlib \ -alsa \ -gif \ -gstreamer 1.0 \ -pulseaudio \ -fontconfig \ -system-freetype \ -no-dbus \ -no-xcb \ -no-separate-debug-info \ -skip webengine
sudo gedit qtbase/mkspecs/linux-aarch64-gnu-g++/qmake.conf
修改后的qmake.conf文件内容为:
# # qmake configuration for building with aarch64-linux-gnu-g++ # MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib QT_QPA_DEFAULT_PLATFORM = linuxfb QMAKE_CFLAGS_RELEASE += -O2 -march=armv8-a -lts QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv8-a -lts include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) # modifications to g++.conf QMAKE_CC = aarch64-linux-gnu-gcc QMAKE_CXX = aarch64-linux-gnu-g++ QMAKE_LINK = aarch64-linux-gnu-g++ QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++ # modifications to linux.conf QMAKE_AR = aarch64-linux-gnu-ar cqs QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy QMAKE_NM = aarch64-linux-gnu-nm -P QMAKE_STRIP = aarch64-linux-gnu-strip load(qt_config)
然后再运行命令:
sudo ./autoConfigure.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。