分类: LINUX
帮助文档),USB串口,软件准备:
1、用于 Linux/X11 32位 1.1 编译
将 qt-everywhere-opensource-src-4.6.3.tar.gz 压缩包解压为3,嵌入式 x86 三个版本。
在root份,分别命名为pc1.1.1编译 PC 版
进入pc1.1.2编译嵌入式x86目录,执行如下操作:
# ./configure -embedded x86 -qt-gfx-qvfb -qt-kbd-qvfb -qt-mouse-qvfb
# gmake
# gmake install
安装过程比较长,没有碰到过错误。
编译安装PC:
进入pc/tools/qvfb/目录,执行如下操作:
#make
编译完毕,将pc/bin1.1.3编译嵌入式、编辑/root/.bashrc文件,在最后一行加上 export PATH=/usr/local/arm/3.4.1/bin:/$PATH
3参数, 不然安装后不在QtEmbedded-4.6.3-arm文件夹下,而是覆盖了QtEmbedded-4.6.3。
# ./configure \
-prefix /usr/local/Trolltech/QtEmbedded-4.6.3-arm \
-opensource \
-confirm-license \
-release -shared \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24 \
-fast \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-qt-freetype \
-little-endian -host-little-endian \
-no-qt3support \
-no-libtiff -no-libmng \
-no-opengl \
-no-mmx -no-sse -no-sse2 \
-no-3dnow \
-no-openssl \
-no-webkit \
-no-qvfb \
-no-phonon \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender \
-no-separate-debug-info \
-nomake examples -nomake tools -nomake docs \
4目录中有三个文件夹:Qt-4.6.31.2移植
将Fedora7中的所有文件复制到ARM板 /flash/qt/lib将Fedora7上 /usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin上 /usr/local/Trolltech/QtEmbedded-4.6.3-arm/include中的所有文件复制到ARM目录中;
将Fedora7板 /flash/qt/fonts目录中;
二、Fedora7下搭建Qt Creator开发环境 安装Qt-creator-1.3.1
1、进入目录/root/tmp
设置qt-creator-linux-x86-opensource-1.3.1.bin文件为可执行
#chmod +x qt-creator-linux-x86-opensource-1.3.1.bin
3打开Options窗口。
3、在Options界面左侧,点击Qt4--->Qt Versions“╋”的版本名,区分各个版本即可(如pc版取Qt4.6.3-pc、x86版取QtE4.6.3-x86、arm版取QtE4.6.3-arm)。
单击Qmake Location,右侧Browse按钮,在弹出的“Select QMake Executable程序(按照我们前面安转的,
pc版路径:/usr/local/Trolltech/QtEmbedded-4.6.3/ bin/qmake,
arm示例
从usr/local/Trolltech/QtEmbedded-4.6.3/demos下复制books例程到root/tmp文件夹下。
启动Qt-creator,File--->Open File or Project下的编译与调试
在Qt-creator界面左侧点击Projects图标,打开工程设置界面,执行如下操作:
1、配置:
在Edit Project Settings for Project books--->Build Settings--->Edit Build Configuration弹出对话框单击Ok按钮,在
Edit Build Configuration;下会出现蓝色的Make QtE4.6.3-x86 Release active.字符,单击激活
QtE4.6.3-x86 Release。
在Run Settings--->Edit run configuration“books”“books”,启动Qvfb。
6、回到Qt-creator,Build--->Run:选择Debug项,则调试启动速度比Release时的要快很多。
2.2.2 arm的文件系统的某个目录下,直接把books文件夹复制过去。2、运行及错误处理:
在minicom下面,ps,比如1234,然后通过kill 1234,此时就会出现前面讲到的“relocation error: /usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib/libQtGui.so.4: symbol powf, version GLIBCXX_3.4 not defined in file libstdc++.so.6 with link time reference”错误。
3、解决办法
进入主机/opt/toolchains/arm920t-eabi/arm-angstrom-linux-gnueabi/lib目录下找到libstdc++.so.6。
<span style="font-family: 宋体; font-size: 10.5pt;" times="" new="" roman";="" mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:"times="" mso-bidi-font-family:arial;color:#333333;background:white;mso-font-kerning:="" 0pt;mso-ansi-language:en-us;mso-fareast-language:zh-cn;mso-bidi-language:ar-sa"="">然后再运行./books –qws,看问题是不是解决了!