zlib交叉编译过程

1. 下载libz,网址: http://www.zlib.net/

2. ./configure --shared

     make LDSHARED="arm-linux-gcc -shared -Wl,-soname,libz.so.1" CC_FOR_BUILD="arm-linux-gcc" CC="arm-linux-gcc" LD="arm-linux-ld" CPP="arm-linux-g++ -E" AR="arm-linux-ar rc" prefix="/usr/local/arm/2.95.3"    CFLAGS="-fPIC" libz.so.1.2.3 libz.a

千万不要执行make install ,操作系统会崩溃

3.拷贝zconf.h zlib.h到/usr/local/arm/2.95.3/arm-linux/include/
拷贝 libz.so* 到/usr/local/arm/2.95.3/arm-linux/lib/

 

你可能感兴趣的:(zlib交叉编译过程)