从PC编译到ARM的Qt库

本文详细介绍了如何在Fedora14环境下,利用arm-linux-gcc交叉编译器将Qt库编译为适用于ARM设备的版本。过程中涉及到安装交叉编译器、触屏包tslib的配置和解决编译中遇到的链接问题,最终成功运行了一个简单的QT应用示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

实验目的

学会QT在ARM设备上的移植方法与步骤

实验环境

实验机:Fedora14

Qt库版本:

qt-everywhere-opensource-src-4.8.5.tar.gz

交叉编译器:

arm-linux-gcc-4.3.2.tgz

触屏包:

tslib-1.4.tar.bz2

实验内容

一、安装arm-linux-gcc交叉编译器

a)进入/usr/local下建立arm文件夹

[root@localhost /]# cd /usr/local

[root@localhost local]# mkdir arm

b)解压arm-linux-gcc

[root@localhost arm]#tar -zxvf arm-linux-gcc-4.3.2.tgz

c)添加环境变量

[root@localhost ~]# gedit .bashrc

export PATH=/usr/local/arm/4.3.2/bin:$PATH

[root@localhost ~]# source .bashrc

d)查看arm-linux-gcc是否安装成功

[root@localhost ~]# arm-linux-gcc -v

Using built-in specs.

Target: arm-none-linux-gnueabi

Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值