交叉编译libpng库
前缀条件
依赖zlib库,需要提前交叉编译好zlib库,编译方法见交叉编译zlib
下载地址:
https://nchc.dl.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz
配置:
./configure --prefix=/armlib/libpng --host=arm-histbv310-linux \ CC=/home/czjia/work/sdk041/tools/linux/toolchains/arm-histbv310-linux/bin/arm-histbv310-linux-gcc \ CXX=/home/czjia/work/sdk041/tools/linux/toolchains/arm-histbv310-linux/bin/arm-histbv310-linux-g++ \ --with-zlib-prefix=/armlib/zlib \ CFLAGS=-I/armlib/zlib/include \ LDFLAGS=-L/armlib/zlib/lib \ LIBS=-lz \ LT_SYS_LIBRARY_PATH=/armlib/zlib/lib \ CPPFLAGS=-I/armlib/zlib/include
需要注意的是如果只指定了CFLAGS,在make的时候依然会找不到zlib的头文件,还需要指定预处理器的链接.
交叉编译libjpeg库
下载地址:
http://www.ijg.org/files/jpegsrc.v9d.tar.gz
配置:
./configure --prefix=/armlib/libjpeg --host=arm-histbv310-linux \ CC=/home/czjia/work/sdk041/tools/linux/toolchains/arm-histbv310-linux/bin/arm-histbv310-linux-gcc \ CXX=/home/czjia/work/sdk041/tools/linux/toolchains/arm-histbv310-linux/bin/arm-histbv310-linux-g++