linux - 为 ARM 板交叉编译 QT,配置失败
问题描述
我下载qt-everywhere-opensource-src-5.6.0.tar.gz
并修改/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
为
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QT_QPA_DEFAULT_PLATFORM = linuxfb
QMAKE_CFLAGS += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS += -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_INCDIR += /usr/local/tslib/include
QMAKE_LIBDIR += /usr/local/tslib/lib
# modifications to g++.conf
QMAKE_CC = arm-none-linux-gnueabi-gcc -lts
QMAKE_CXX = arm-none-linux-gnueabi-g++ -lts
QMAKE_LINK = arm-none-linux-gnueabi-g++ -lts
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++ -lts
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_NM = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)
然后我配置(-xplatform linux-arm-gnueabi-g++
将使用qmake.conf
目录)
sudo ./configure -prefix /usr/local/Qt5.6 \
-opensource \
-release \
-confirm-license \
-xplatform linux-arm-gnueabi-g++ \
-shared \
-qt-zlib \
-no-gif \
-qt-libjpeg \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-dbus \
-no-rpath \
-no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 \
-no-avx \
-no-openssl \
-nomake tools \
-qreal float \
-qt-libpng \
-tslib \
-nomake examples
但是配置失败,它输出如下
+ cd qtbase
+ /work/QT/qt-everywhere-opensource-src-5.6.0/qtbase/configure -top-level -prefix /usr/local/Qt5.6 -opensource -release -confirm-license -xplatform linux-arm-gnueabi-g++ -shared -qt-zlib -no-gif -qt-libjpeg -no-nis -no-opengl -no-cups -no-glib -no-dbus -no-rpath -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-openssl -nomake tools -qreal float -qt-libpng -tslib -nomake examples
This is the Qt Open Source Edition.
You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) versions 3.
You have already accepted the terms of the Open Source license.
Running configuration tests (phase 1)...
Done running configuration tests.
Creating qmake...
make: g++: Command not found
make: *** [project.o] Error 127
为什么它由g++
而不是arm-none-linux-gnueabi-g++
?
解决方案
推荐阅读
- swift - 如何在现实世界中随机放置 AR 对象?
- node.js - 如何使用 Google 计算 node.js api 创建具有公共 IP 地址的接口?
- mysql - 从 Dash 框架中的输入字段中检索值
- javascript - React.js 用户对话 UI 设计
- sql-server - 在 SQL Server 中使用条件读取节点值
- typescript - TypeScript 中的另一个多态性问题
- python - Pandas 基于单个列进行聚合,同时保留其他列
- git - 从 master 获取最新更新到我的分支
- php - 在 PHP 中使用无限时间的 Oracle 查询
- python - Seaborn 点图中的分离点和误差条问题