freetype 交叉编译

*libfreetype.so
*libpng.so
*libz.so

*libfreetype.so
./configure --prefix=/opt/include --host=mipsel-linux
出错:
src/gzip/ftgzip.c:50:18: fatal error: zlib.h: No such file or directory
下载libz库http://download.chinaunix.net/download.php?id=35620&ResourceID=12241
gvim fzgzip.c的第50行修改为#include <刚刚下载的libz路径/zlib.h>
出错
/opt/mipsel-gcc472-glibc216-mips32/bin/../lib/gcc/mips-linux-gnu/4.7.2/../../../../mips-linux-gnu/bin/ld: cannot find -lpng12
下载libpng库
执行./autogen.sh 生成configure
./configure --prefix=/home/jim/test/lcd/chinese_show/pro/libpng/os/install_include --host=mipsel-linux
接下来的错误都是包含zlib.h的路径出错,修改zlib.h的路径,编译通过, 然后make install 把libz的头文件,库都放在刚刚prefix的目录

*libz.so交叉编译
./configure --prefix=/home/opt/zlib-1.2.3/install_include --shared
修改Makefile的CC=mipsel-linux-gcc
LDSHARED=mipsel-linux-gcc -shared -Wl,-soname,libz.so.1
CPP=mipsel-linux-gcc -E
make install 编译生成的头文件和库在install_include

现在libpng.so 和libz.so的头文件和库都有了,接下来就可以编译libfreetype.so.
编译libfreetype.so出错是因为库缺少
 -lz -lpng12 -Wl,-soname -Wl,libfreetype.so.6 -o /home/jim/test/lcd/chinese_show/pro/freetype-2.6/os/objs/.libs/libfreetype.so.6.12.0

在-lz -lpng12前面加上-L库目录,编译通过生成动态库文件libfreetype.so.6.12.0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值