一、交叉编译libjpeg
tar xzf libjpeg-turbo-1.2.1.tar.gz
cd libjpeg-turbo-1.2.1
./configure --prefix=/work/projects/12.libjpeg/libjpeg-turbo-1.2.1/tmp/ --host=arm-linux
make
make install
二、交叉编译jpg2rgb.c
2.1
arm-linux-gcc -o jpg2rgb jpg2rgb.c -I /work/projects/12.libjpeg/libjpeg-turbo-1.2.1/tmp/include -L /work/projects/12.libjpeg/libjpeg-turbo-1.2.1/tmp/lib -ljpeg
cp jpg2rgb /work/nfs_root/fs_mini_mdev_new
cp libjpeg-turbo-1.2.1/tmp/lib/*so* /work/nfs_root/fs_mini_mdev_new/lib/ -d
2.2
把编译出来的头文件应该放入:
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include
:
cd /work/projects/12.libjpeg/libjpeg-turbo-1.2.1/tmp/include
cp * /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include
把编译出来的库文件应该放入:
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib
:
cd /work/projects/12.libjpeg/libjpeg-turbo-1.2.1/tmp/lib
cp *so* -d /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib
arm-linux-gcc -o jpg2rgb jpg2rgb.c -ljpeg
三、在开发板上运行
阅读(5701) | 评论(0) | 转发(1) |