2

我是 Qt 新手,我正计划使用 ARM GNU 工具链为我的 ARM Cortex-A8 处理器平台构建 Qt 库。我在该目录中使用 Qt for Embedded Linux (qt-everywhere-opensource-src-4.6.2) 我必须首先使用./configure. 我给出的选项是这样的 -

./configure -embedded arm -xplatform qws/linux-arm-g++ -little-endian -webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools -qt-mouse-tslib -qt-kbd-linuxinput

当我运行它时,我得到了这些系列的错误。make找不到命令 c。配置本身Makefile会在执行 ./configure 命令时生成它运行的内容,因此我什至无法从工具 c 更改为 ARM GNU 工具。

c -o qfile.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfile.cpp
make: c: Command not found
make: [qfile.o] Error 127 (ignored)
c -o qfsfileengine_unix.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine_unix.cpp
make: c: Command not found
make: [qfsfileengine_unix.o] Error 127 (ignored)
c -o qfsfileengine_iterator_unix.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine_iterator_unix.cpp
make: c: Command not found
make: [qfsfileengine_iterator_unix.o] Error 127 (ignored)
c -o qfsfileengine.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine.cpp
make: c: Command not found
make: [qfsfileengine.o] Error 127 (ignored)
c -o qfsfileengine_iterator.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine_iterator.cpp
make: c: Command not found
make: [qfsfileengine_iterator.o] Error 127 (ignored)
c -o qregexp.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/tools/qregexp.cpp
make: c: Command not found
make: [qregexp.o] Error 127 (ignored)
c -o qvector.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/tools/qvector.cpp
make: c: Command not found
make: [qvector.o] Error 127 (ignored)
c -o qbitarray.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/tools/qbitarray.cpp
make: c: Command not found
make: [qbitarray.o] Error 127 (ignored)
c -o qdir.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qdir.cpp
make: c: Command not found
make: [qdir.o] Error 127 (ignored)
c -o qdiriterator.o -pipe   -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/include/QtCore -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/global -I/home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/local/ti-sdk-am180x-evm/linux-devkit/arm-arago-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /home/sandeep/Downloads/qt-everywhere-opensource-src-4.6.2/src/corelib/io/qdiriterator.cpp
4

1 回答 1

0

为了解决这个问题,我做了两件事。

首先,在qmake.conf我给定平台的文件中,我确保我拥有编译器和其他工具设置的完整路径。我使用的是linux-arm-g++. 例如,我的编译器位于:/home/lucid/compiler/linux-gnueabi-g++. 这就是我为 QMAKE_CXX、QMAKE_LINK 和 QMAKE_LINK_SHLIB 输入的内容。对于 QMAKE_CC 也是如此。

 QMAKE_CC          = /home/lucid/compiler/linux-gnueabi-gcc
 QMAKE_CXX         = /home/lucid/compiler/linux-gnueabi-g++
 QMAKE_LINK        = /home/lucid/compiler/linux-gnueabi-g++
 QMAKE_LINK_SHLIB  = /home/lucid/compiler/linux-gnueabi-g++

还要确保将包含设置为正确的子路径include(../common/linux.conf)可能需要include(../../common/linux.conf)

其次,我设置了PATH=location_of_compiler:$PATH库和编译器,以便从正确的位置拉出。在尝试编译所有 QT 之前,我使用 HelloWorld 应用程序的简单构建对此进行了测试。

我不知道两者是否都是必要的,PATH可能就足够了,但在我看来,我需要两者都做。

于 2013-08-12T17:37:47.543 回答