miniGui交叉编译

本文主要描述minigui交叉编译过程:

1.jpeg-7

step1:
./configure --prefix=/home/book/work/toolchain_book/arm/jpeg-7 --host=arm-linux CC=arm-linux-gnueabihf-gcc

step2:
make

step3:
make install

2.freetype

step1:
./configure --prefix=/home/book/work/toolchain_book/arm/freetype --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc –with-zlib=no
step2:
make
step3:
make install

3.harfbuzz

step1:

./configure --prefix=/home/book/work/toolchain_book/arm/harfbuzz --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc --with-glib=no --with-freetype=yes PKG_CONFIG_PATH=/home/book/work/toolchain_book/arm/freetype/lib/pkgconfig

step2:
make
step3:
make install

FAQ:
1.添加了—with-freetype=yes,执行configure后报错:
configure: error: FreeType support requested but libfreetype2 not found
解决办法:
添加变量PKG_CONFIG_PATH

4.zlib

step1:
./configure --shared –prefix=/home/book/work/toolchain_book/arm/zlib
step2:
修改Makefile文件 ,在工具链前加上arm-linux-gnueabihf-
step3:
make
step4:
make install

FAQ:
./configure –help
usage:
configure [–shared] [–prefix=PREFIX] [–exec_prefix=EXPREFIX]
[–libdir=LIBDIR] [–includedir=INCLUDEDIR]

Zlib配置是不支持—host项,交叉编译时需要手动更改Makefile,将Makfile里的gcc、ar、ranlib均加上前缀arm-linux-gnueabihf-,再执行make && make install,编译安装成功后在—prefix指定的目录下生成include、shared和lib目录.

5.libpng

step1:
./configure --prefix=/home/book/work/toolchain_book/arm/libpng --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc执行此操作直接报错:configure: error: zlib not installed.继续添加其他变量依然无法解决该问题。

解决办法:
要解决这个问题最重要的是要了解到libpng库是不需要configure的,因为在scripts目录下已经提供makefile,所以没有必要使用configure来创建makefle文件了。
因此把scripts目录下mak

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值