gpt4 book ai didi

c++ - 如何通过 g++-arm-linux-gnueabihf 为 Arm 构建 Qt?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:42:32 26 4
gpt4 key购买 nike

  1. 下载的Qt源码

  2. 将 linux-arm-gnueabi-g++ 复制到 linux-arm-gnueabihf-g++(在 qtbase/mkspecs 中)

  3. 在文件夹中编辑 qmake.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

推出:

./configure -prefix /home/asianirish/Qt-custom/qt-embedded-5.7 -debug -static -xplatform linux-arm-gnueabihf-g++ -qt-zlib -reduce-relocations -no-libpng -no-libjpeg -no-sql-sqlite2 -no-sql-psql -no-sql-mysql -no-sql-odbc -no-sql-oci -no-sql-ibase -no-sql-db2 -no-qml-debug -no-widgets -no-gui -no-opengl -openssl-linked -opensource -confirm-license -v

得到:

arm-linux-gnueabihf-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling
^
Symbolic function binding disabled.
-reduce-relocations was requested but this compiler does not support it
Re-run configure with -v for more information

错误:QTBUG-36129

有什么解决方法吗?

  • Qt 5.7
  • 主机:Ubuntu 15.10 64 位
  • ARM:Debian GNU/Linux 7 32 位

最佳答案

赛灵思用户我更改了 cross_compile

gedit /etc/profile

export PATH="$PATH:/opt/petalinux-v2015.4-final/tools/linux-i386/arm-xilinx-gnueabi/bin"

export PATH="$PATH:/opt/Xilinx/SDK/2015.4/gnu/arm/lin/bin/"

#export PATH="$PATH:/usr/local/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi/bin"
#export PATH="$PATH:/usr/local/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi/libexec/gcc/arm-eabi/7.2.1"

关于c++ - 如何通过 g++-arm-linux-gnueabihf 为 Arm 构建 Qt?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41150405/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com