完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1. 概述
2. 配置Qt5.9.5 2.1 mkspec配置文件 bruce@bruce:~/Code/qtsourcecode/qt-everywhere-opensource-src-5.9.5/qtbase/mkspecs/linux-arm-som-rk3399$ cat qmake.conf # # qmake configuration for building with aarch64-linux-gnu-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) QMAKE_INCDIR_POST += /usr/aarch64-linux-gnu/include QMAKE_LIBDIR_POST += /usr/aarch64-linux-gnu/lib QT_QPA_DEFAULT_PLATFORM = xcb QMAKE_CFLAGS_RELEASE += -O2 -march=armv8-a -mcpu=cortex-a72 QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv8-a -mcpu=cortex-a72 QMAKE_CXXFLAGS += -std=c++17 QMAKE_LIBS += -lrt # 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) 2.2 配置脚本 #!/bin/bash ../configure -xplatform linux-arm-som-rk3399 -prefix /home/bruce/Code/qtsourcecode/qt-everywhere-opensource-src-5.9.5/shadow_build/qt5.9.5_install -release -opensource -confirm-license -make libs -pch -qt-libjpeg -qt-libpng -qt-zlib -no-opengl -no-sse2 -no-openssl -no-cups -no-glib -no-dbus -qpa xcb -no-xcb -no-separate-debug-info -c++std c++11 -nomake tests -nomake examples -strip -optimized-tools -make tools -recheck-all
2.3 执行make docs时出现的错误
2.3.1 查找"ld-linux-aarch64.so.1" ruce@bruce:~$ sudo find / -name "ld-linux-aarch64.so.1" [sudo] password for bruce: find: ‘/run/user/1000/gvfs’: Permission denied /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /opt/FriendlyARM/toolchain/6.4-aarch64/aarch64-cortexa53-linux-gnu/sysroot/lib/ld-linux-aarch64.so.1 /opt/FriendlyARM/toolchain/gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu/aarch64-linux-gnu/libc/lib/ld-linux-aarch64.so.1 /opt/FriendlyARM/toolchain/gcc-linaro-aarch64-linux-gnu-4.8-2013.10_linux/aarch64-linux-gnu/libc/lib/ld-linux-aarch64.so.1 /home/bruce/Softwares/gcc-linaro-aarch64-linux-gnu-4.8-2013.10_linux/aarch64-linux-gnu/libc/lib/ld-linux-aarch64.so.1
bruce@bruce:~$ sudo cp /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib
2.4 执行make install_docs安装Qt手册 bruce@bruce:~/Code/qtsourcecode/qt-everywhere-opensource-src-5.9.5/shadow_build$ make install_docs 3. 打开QtCreator配置环境(仍然用安装Qt5.14.2时的QCreator) 3.1 配置使用的Qt版本(Qt5.9.5) 3.2 配置build kits 3.3 配置Qt5.9.5的API手册
3.4 测试API手册
4. 将编译的Qt5.9.5拷贝到SOM-RK3399配置环境 pi@SOM-RK3399v2:/$ cat /etc/profile # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "${PS1-}" ]; then if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. # PS1='h:w$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi #QTDIR=/usr/local/Trolltech/Qt-5.10.0-rk64one #QT_QPA_PLATFORM=xcb #QT_QPA_EGLFS_HIDECURSOR=0 #QTWEBENGINE_DISABLE_SANDBOX=1 #QT_QPA_FONTDIR=/usr/share/fonts/truetype/ubuntu-font-family #QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/Trolltech/Qt-5.10.0-rk64one/plugins/ export QTDIR=/opt/qt5.9.5_install export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH #export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/Trolltech/Qt-5.10.0-rk64one/plugins/ export QT_QPA_PLATFORM=xcb export QT_QPA_FONTDIR=/usr/share/fonts/truetype/ubuntu-font-family |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
1043 浏览 0 评论
1220 浏览 1 评论
968 浏览 1 评论
2238 浏览 1 评论
3561 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 22:32 , Processed in 0.549615 second(s), Total 70, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (威廉希尔官方网站 图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号