0

我正在使用以下(http://www.cloud-rocket.com/2013/07/...or-beaglebone/)链接在 beablebone black 上进行交叉编译。但是,在修改 qmake.conf 文件后,我在关注此链接时遇到了以下错误

1) 修改 qmake.conf 细节:

enter code here
# qmake configuration for building with arm-linux-g++
#

include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g`enter code here`++-unix.conf)
include(../../common/qws.conf)

# modifications to g++.conf
#Toolchain

#Compiler Flags to take advantage of the ARM architecture
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-      abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

QMAKE_CC = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/gcc
QMAKE_CXX = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++
QMAKE_LINK = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++
QMAKE_LINK_SHLIB = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++

# modifications to linux.conf
QMAKE_AR = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/ar cqs
QMAKE_OBJCOPY = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/objcopy
QMAKE_STRIP = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/strip
load(qt_config)

2)错误:

g++ -c -o project.o -pipe -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/include -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/include/QtCore -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/src/corelib/global -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/src/corelib/xml -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/harshal/Tool_chain\ setup/qt-4.8.5-beagle/mkspecs/qws/linux-x86-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED project.cpp
make: g++: Command not found
make: *** [project.o] Error 127

有人可以帮助解决错误吗?

4

2 回答 2

0

在我看来,编译器是未知的。您是否按照指示正确“安装”了它?:

tar -C / -xjf angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2

如果您错过了“-C /”,这可能是一个原因,因为 qmake.conf 直接引用了路径。

您可以通过以下方式检查:

 find / -name "arm\-angstrom\-linux\-gnueabi" 2>/dev/null
于 2014-03-12T13:54:05.157 回答
0

你应该在 PATH 上有 g++。确保 g++ 可以通过调用来访问: which g++

于 2019-03-02T06:51:58.817 回答