Linux下安装与使用Qt Creator及移植Qt4.6.3到ARM

需积分: 10 0 下载量 43 浏览量 更新于2024-09-17 1 收藏 47KB DOC 举报
"这篇文档主要介绍了在Linux环境下如何安装和使用Qt Creator,特别是针对Fedora9系统下构建ARM开发环境并移植Qt4.6.3的步骤。文章首先强调了Qt在开源、面向对象和跨平台等方面的优点,然后详细阐述了安装Qt Creator的过程,以及在不同平台上编译Qt库的方法,包括PC、嵌入式x86和ARM架构。" 在Linux环境中,Qt Creator作为官方推荐的集成开发环境(IDE),为Qt应用开发提供了便利。文档首先提示读者需要先完成Qt的编译与安装,这可以通过参考作者的另一篇博客来实现。接着,通过`uname -a`命令确定系统的架构,这对于选择合适的Qt版本至关重要。 在Fedora9系统下搭建Qt Creator的ARM开发环境,需要以下步骤: 1. **下载软件包**:从Nokia的官方网站获取Qt SDK和Qt库4.6.3的源代码包,以及适用于嵌入式Linux的GCC编译器。 2. **解压与复制**:解压Qt库源代码,并复制到不同的目录以分别编译为PC、嵌入式x86和ARM版本。 3. **编译PC版Qt**:进入相应目录,运行`./configure`,然后执行`gmake`和`gmake install`来完成编译和安装。 4. **编译嵌入式x86版Qt**:在嵌入式x86目录下,使用特定的配置选项`./configure -embedded x86-qt-gfx-qvfb-qt-kbd-qvfb-qt-mouse-qvfb`,再进行编译和安装。 5. **编译ARM版Qt**:对于ARM平台,需要类似的配置和编译过程,但需要确保交叉编译工具链(如arm-linux-gcc)的正确设置。 6. **安装Qt for ARM**:在完成编译后,将ARM版的Qt库移植到目标设备,例如mini2440,这通常涉及到通过USB串口将库文件传输到设备上。 7. **配置Qt Creator**:在Fedora9中安装Qt Creator后,需要配置编译器和设备信息,以便在IDE中调试和部署ARM设备上的应用程序。 8. **创建Hello World示例**:使用Qt Creator新建一个项目,编写简单的“Hello World”程序,测试开发环境是否正常工作。 通过这个过程,开发者可以成功地在Fedora9上搭建一个完整的Qt开发环境,不仅支持本地开发,还能进行跨平台的ARM设备开发。这个环境为Qt应用的开发提供了坚实的基础,让开发者能够利用Qt的强大功能和灵活性来创建高质量的图形用户界面应用。

Command line: -prefix /home/liuyh/workspace/qt5.14.2-arm -opensource -confirm-license -release -strip -shared -xplatform linux-arm-gnueabi-g++ -optimized-qmake -c++std c++11 --rpath=no -pch -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtwayland -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -make libs -make examples -nomake tools -nomake tests -gui -widgets -dbus-runtime --glib=no --iconv=no --pcre=qt --zlib=qt -no-openssl --freetype=qt --harfbuzz=qt -no-opengl -linuxfb --xcb=no -tslib --libpng=qt --libjpeg=qt --sqlite=qt -plugin-sql-sqlite -I/opt/tslib/include -L/opt/tslib/lib -recheck-all executing config test machineTuple + arm-linux-gnueabi-g++ -dumpmachine > sh: 1: arm-linux-gnueabi-g++: not found test config.qtbase.tests.machineTuple FAILED executing config test verifyspec + cd /home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/config.tests/verifyspec && /home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_LIBDIR += /opt/tslib/lib' 'INCLUDEPATH += /opt/tslib/include' -early "CONFIG += cross_compile" /home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/qtbase/config.tests/verifyspec + cd /home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make > rm -f verifyspec.o > rm -f *~ core *.core > arm-linux-gnueabi-g++ -c -O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon -mfloat-abi=hard -O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon -mfloat-abi=hard -pipe -O2 -w -fPIC -I/home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/qtbase/config.tests/verifyspec -I. -I/opt/tslib/include -I/home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-arm-gnueabi-g++ -o verifyspec.o /home/liuyh/workspace/QT5.14.2/qt-everywhere-src-5.14.2/qtbase/config.tests/verifyspec/verifyspec.cpp > make:arm-linux-gnueabi-g++:命令未找到 > make: *** [Makefile:172:verifyspec.o] 错误 127

274 浏览量