我正在尝试使用groups
文件从源代码编译Qt5。我提取文件,并创建以下qt-everywhere-opensource-src-5.9.6.tar.xz
:
qmake.conf
接下来,我进入提取的qt文件夹,并使用以下参数调用#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
include(../../common/qws.conf)
# Compiler Flags to take advantage of the ARM architecture
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
# modifications to g++.conf
QMAKE_CC = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
QMAKE_CXX = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
QMAKE_LINK = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
# modifications to linux.conf
QMAKE_AR = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabi-objcopy
QMAKE_STRIP = /{homedir}/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabi-strip
load(qt_config)
:
./configure
它运行了一段时间然后抛出了这个错误:
./configure -v -opensource -confirm-license -prefix /{homedir}/qt-everywhere-opensource-src-5.9.6 -xplatform linux-arm-gnueabihf-g++ -embedded arm -little-endian -host-little-endian -no-qt3support -nomake demos -nomake examples -qt-gfx-linuxfb -qt-gfx-qvfb -qt-gfx-vnc -no-accessibility
这是因为使用Info: creating super cache file /{homedir}/qt-everywhere-opensource-src-5.9.6/.qmake.super
ERROR: Invalid command line parameter 'arm'.
选项吗?我看到很多页面正在使用它,所以我不确定为什么会出现此错误。请帮忙。
答案 0 :(得分:2)
您可能会看到有关如何交叉编译Qt4的示例。 Qt4具有“嵌入式臂”选项,但Qt5没有。