我是Qt的新手,我正计划使用ARM GNU工具链为我的ARM Cortex-A8处理器平台构建Qt库。我在该目录中使用Qt for Embedded Linux(qt-everywhere-opensource-src-4.6.2)我必须首先使用./configure
配置ARM体系结构和其他选项。我给出的选项是这样的 -
./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。 configure本身会生成执行./configure命令时运行的Makefile
,所以我甚至无法从工具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
答案 0 :(得分: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
可能就足够了,但在我看来,我需要同时做到这两点。