您的位置:首页 > 其它

zlib库交叉编译方法

2014-10-14 14:17 274 查看
下载地址:http://www.zlib.net/

版本:1.2.8

编译环境:arm-linux

编译方法:

1、export CC=arm-linux-gcc

2、./configure --prefix=$PWD/_install

_install为创建输出的指定目录

如果出现如下错误时:

[root@localhost zlib-1.2.8]# ./configure --shared --prefix=$PWD/_install

Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).

在configure 删除以下字段,避免将warn处理为error :

echo "Checking for obsessive-compulsive compiler options..." >> configure.log

if try $CC -c $CFLAGS $test.c; then

:

else

echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log

leave 1

fi

3、make && make install

4、在_install/lib目录下是动态与静态库文件,_install/include下是头文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: