交叉编译SDL库问题

内核编译和嵌入式产品的设计与开发
回复
sexlady
帖子: 16
注册时间: 2010-12-24 13:50
送出感谢: 0
接收感谢: 0

交叉编译SDL库问题

#1

帖子 sexlady » 2011-01-24 10:39

在我编译安装SDL库时,用交叉编译工具就会出现下面的错误报告,用pc的gcc就正常,是不该用交叉编译工具还是我哪里错了?谢谢了

./configure

checking for gcc... /home/eoollo/toolchain/arm-2009q1/bin/arm-none-linux-gnueabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/home/eoollo/toolchain/SDL-1.2.14':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

而如果用下面的命令

./configure --prefix=/opt/libSDL --host=arm-linux --disable-video --disable-arts --disable-nasm --disable-video-x11 --disable-nas --disable-joystick --disable-cdrom

make时会出现一下错误:

libtool: compile: /home/eoollo/toolchain/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/audio/esd/SDL_esdaudio.c -fPIC -DPIC -o build/.libs/SDL_esdaudio.o

./src/audio/esd/SDL_esdaudio.c:30:17: error: esd.h: No such file or directory
./src/audio/esd/SDL_esdaudio.c: In function 'ESD_OpenAudio':
./src/audio/esd/SDL_esdaudio.c:274: error: 'esd_format_t' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:274: error: (Each undeclared identifier is reported only once
./src/audio/esd/SDL_esdaudio.c:274: error: for each function it appears in.)
./src/audio/esd/SDL_esdaudio.c:274: error: expected ';' before 'format'
./src/audio/esd/SDL_esdaudio.c:277: error: 'format' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:277: error: 'ESD_STREAM' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:277: error: 'ESD_PLAY' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:280: error: 'ESD_BITS8' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:283: error: 'ESD_BITS16' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:290: error: 'ESD_MONO' undeclared (first use in this function)
./src/audio/esd/SDL_esdaudio.c:292: error: 'ESD_STEREO' undeclared (first use in this function)
make: *** [build/SDL_esdaudio.lo] 错误 1
用pc的gcc同样没有问题
头像
tonghuix
帖子: 355
注册时间: 2010-10-08 0:55
送出感谢: 0
接收感谢: 2 次

Re: 交叉编译SDL库问题

#2

帖子 tonghuix » 2011-08-12 15:47

--disable-alsa

参考http://my.chinaunix.net/space.php?uid=22666248&do=blog&id=267279
/***
* @tonghuix 佟辉 Tong Hui
* @brief 启智开源 编码自由
* @brief Open Source Open Mind, Coding for free!
* @website: https://tonghuix.io
* @weibo http://weibo.com/234826309
* @Twitter http://twitter.com/tonghuix
* @G+ http://gplus.to/tonghuix
*/
回复

回到 “内核及嵌入式开发”