【ARM开发】交叉编译Qt源码之(2)编译X11

本文详细介绍了如何交叉编译X11依赖的Xtrans、xcb和xorgproto库,适用于ARM开发。首先,按照Xtrans->xorgproto->xcb的顺序进行编译,然后编译X11。每个库的编译步骤包括下载源码、解压、设置交叉编译环境、配置、编译和安装。过程中需注意配置编译选项,确保编译结果安装在交叉编译器目录下。

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

1、依赖

        X11依赖Xtrans、xcb和xorgproto,因此编译顺序为Xtrans->xorgproto->xcb->X11。

        1.1、编译Xtrans

        下载地址

        Index of /releases/individual/libhttps://www.x.org/releases/individual/lib/

#解压
tar -zxvf xtrans-1.4.0.tar.gz
cd xtrans-1.4.0
#交叉编译环境,其中/path/to/cross-compile指交叉编译器目录
#如/home/user/toolchain/arm-linux-gnueabihf/bin
export PATH=$PATH:/path/to/cross-compile
#配置,其中/path/to/prefix指编译安装目录
#如/home/user/toolchain/arm-linux-gnueabihf/arm-linux-gnueabihf
#把编译结果安装在交叉编译器中,否则引用到该库需要指定对应的目录
./configure --prefix=/path/to/prefix \
--host=arm-linux-gnueabihf \
--enable-option-checking
#编译
make
#安装
make install

        1.2、编译xorgproto、xcb        【ARM开发】交叉编译Qt源码之(1)编译xcb_console_log的博客-CSDN博客下载地址:Index of /disthttps://xcb.freedesktop.org/dist/解压tar -zxvf libxcb-1.13.tar.gz执行指令export PATH=$PATH:${CROSS_COMPELE_PATH}./configure --host=arm-none-linux-gnueabihf --prefix=${INSTALL_PREFIX}https://blog.csdn.net/console_log/article/details/122826798?spm=1001.2014.3001.5501

1、编译X11

下载地址:

Index of /releases/individual/libhttps://www.x.org/releases/individual/lib/

#解压
tar -zxvf libX11-1.7.2.tar.gz
cd libX11-1.7.2
#交叉编译环境,其中/path/to/cross-compile指交叉编译器目录
#如/home/user/toolchain/arm-linux-gnueabihf/bin
export PATH=$PATH:/path/to/cross-compile
#配置,其中/path/to/prefix指编译安装目录
#如/home/user/toolchain/arm-linux-gnueabihf/arm-linux-gnueabihf
#把编译结果安装在交叉编译器中,否则引用到该库需要指定对应的目录
./configure --prefix=/path/to/prefix \
--host=arm-linux-gnueabihf \
--enable-option-checking \
--enable-unix-transport \
--enable-tcp-transport \
--enable-ipv6 \
--enable-local-transport \
--enable-malloc0returnsnull
#编译
make
#安装
make install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值