交叉编译framebuff图片浏览工具fbv

板子:君益兴的 helper2416  编译器arm-linux-gcc
到官网http://freshmeat.net/projects/fbv/下载最新的fbv源码,fbv-0.99.tar.gz
http://sourceforge.net/projects/giflib/下载giflib
http://www.libpng.org/pub/png/libpng.html下载  libpng

我是没有 选择x11选项的

tar -xvf giflib-4.1.6.tar.bz2
cd giflib-4.1.6/

CC=$arm-linux-gcc  ./configure --prefix=/usr/local/arm/arm412 --host=$arm-linux --without-x --disable-x11

make

sudo make install

libpng编译方法差不多的,略。

tar -xvf fbv-0.99.tar.gz
cd   fbv-0.99
make CC="arm-linux-gcc -O2 -Wall -I/usr/local/arm/arm412/include" LIB="-L/usr/local/arm/arm412/lib -lgif -ljpeg -lpng"

出错:
In file included from /opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/stdlib.h:438,
                 from fb_display.c:22:
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/sys/types.h:62: error: conflicting types for ‘dev_t’
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/sys/types.h:67: error: conflicting types for ‘gid_t’
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/linux/types.h:27: error: previous declaration of ‘gid_t’ was here
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/sys/types.h:72: error: conflicting types for ‘mode_t’
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/linux/types.h:15: error: previous declaration of ‘mode_t’ was here
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/sys/types.h:77: error: conflicting types for ‘nlink_t’
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/linux/types.h:16: error: previous declaration of ‘nlink_t’ was here
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/sys/types.h:82: error: conflicting types for ‘uid_t’
/opt/toolchains/arm920t-eabi/lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/include/linux/types.h:26: error: previous declaration of ‘uid_t’ was here

解决方法修改fb_display.c 把#include <sys/types.h> 放到最前面。
再编译,就可以过了。
作者:帅得不敢出门 程序员群:31843264

你可能感兴趣的:(交叉编译framebuff图片浏览工具fbv)