当前位置:首页 > 嵌入式培训 > 嵌入式学习 > 讲师博文 > qt的移植

qt的移植 时间:2018-09-21      来源:未知

1、下载qt-everywhere-opensource-src-4.8.1.tar.gz, 下载连接地址如下://download.qt.io/archive/qt/4.8/4.8.1/

2. 解压qt压缩文件tar xvf qt-everywhere-opensource-src-4.8.1.tar.gz

3. 为了编译的方便编译 ,写了一个配置文件bulid.sh

内容如下:

#!/bin/sh

./configure -prefix ../qt-4.8.1-powerpc \

-release \

-opensource \

-embedded powerpc \

-no-webkit \

-no-qt3support \

-xplatform qws/linux-powerpc-g++ \

-qt-gfx-linuxfb \

-big-endian \

-no-openssl

并且修改bulid.sh的属性,chmod a+x bulid.sh

4. 添加qws的编译器

修改 vi mkspecs/qws/linux-powerpc-g++/qmake.conf

把配置文件内的工具连换成自己系统的工具连

# modifications to g++.conf

QMAKE_CC = powerpc-none-linux-gnuspe-gcc

QMAKE_CXX = powerpc-none-linux-gnuspe-g++

QMAKE_LINK = powerpc-none-linux-gnuspe-g++

QMAKE_LINK_SHLIB = powerpc-none-linux-gnuspe-g++

# modifications to linux.conf

QMAKE_AR = powerpc-none-linux-gnuspe-ar cqs

QMAKE_OBJCOPY = powerpc-none-linux-gnuspe-objcopy

QMAKE_STRIP = powerpc-none-linux-gnuspe-strip

需要修改的位置如上。

5. 配置qt

运行bulid.sh 这个脚本  ./bulid.sh

6. 编译基于powerpc的qt库文件

make -j4 && make install

编译时间大概1小时左右, 编译完成后在上一级的目录会有一个qt-4.8.1-powerpc 文件夹, 这个文件夹内的内容就是基于powerpc的qt库。

7. 再编译一个本地的QT库 , 以便于本地调试应用程序,运行命令进行配置

./configure -prefix ../qt-4.8.1-desktop

8. 编译本地的QT工程

make -j4 && make install

编译完成后在上一级的目录会有一个qt-4.8.1-desktop 文件夹, 这个文件夹内的内容就是基x86 的qt库。

上一篇:微信公众平台设计——消息处理

下一篇:关于linux系统的日志文件的学习与理解

热点文章推荐
华清学员就业榜单
高薪学员经验分享
热点新闻推荐
前台专线:010-82525158 企业培训洽谈专线:010-82525379 院校合作洽谈专线:010-82525379 Copyright © 2004-2022 北京华清远见科技集团有限公司 版权所有 ,京ICP备16055225号-5京公海网安备11010802025203号

回到顶部