当前位置: 技术问答>linux和unix
为arm平台写了个使用sdl的测试程序衔接时出现skipping incompatible然后就提示cannot find -lSDL了
来源: 互联网 发布时间:2016-12-08
本文导语: makefile是这样写的 CC=arm-kindle-linux-gnueabi-gcc Target=fillrect $(Target): $(Target).o $(CC) -lSDL -L/home/xsj/kindlelib -o $(Target) $(Target).o $(Target).o:$(Target).c $(CC) -c $(Target).c -I/home/xsj/kindlelib clean: ...
makefile是这样写的
CC=arm-kindle-linux-gnueabi-gcc
Target=fillrect
$(Target): $(Target).o
$(CC) -lSDL -L/home/xsj/kindlelib -o $(Target) $(Target).o
$(Target).o:$(Target).c
$(CC) -c $(Target).c -I/home/xsj/kindlelib
clean:
rm -f *.o
install:
cp $(Target) /srv/ftp/file/
/home/xsj/kindlelib目录下有从目标平台上复制下来的libSDL-1.2.so.0
出错信息如下:
arm-kindle-linux-gnueabi-gcc -lSDL -L/home/xsj/kindlelib -o fillrect fillrect.o
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: skipping incompatible /home/xsj/kindlelib/libSDL.so when searching for -lSDL
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: skipping incompatible /home/xsj/kindlelib/libSDL.a when searching for -lSDL
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
make: *** [fillrect] 错误 1
请问难道是我需要自己交叉编译sdl吗,只有一个libSDL-1.2.so.0不够吗?
谢谢大家帮忙
CC=arm-kindle-linux-gnueabi-gcc
Target=fillrect
$(Target): $(Target).o
$(CC) -lSDL -L/home/xsj/kindlelib -o $(Target) $(Target).o
$(Target).o:$(Target).c
$(CC) -c $(Target).c -I/home/xsj/kindlelib
clean:
rm -f *.o
install:
cp $(Target) /srv/ftp/file/
/home/xsj/kindlelib目录下有从目标平台上复制下来的libSDL-1.2.so.0
出错信息如下:
arm-kindle-linux-gnueabi-gcc -lSDL -L/home/xsj/kindlelib -o fillrect fillrect.o
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: skipping incompatible /home/xsj/kindlelib/libSDL.so when searching for -lSDL
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: skipping incompatible /home/xsj/kindlelib/libSDL.a when searching for -lSDL
/usr/local/arm-kindle-linux-gnueabi/bin/../lib/gcc/arm-kindle-linux-gnueabi/4.4.5/../../../../arm-kindle-linux-gnueabi/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
make: *** [fillrect] 错误 1
请问难道是我需要自己交叉编译sdl吗,只有一个libSDL-1.2.so.0不够吗?
谢谢大家帮忙
|
应该是名字不对
试试 -lSDL-1.2
或者改名 libSDL-1.2 为 libSDL
试试 -lSDL-1.2
或者改名 libSDL-1.2 为 libSDL
|
SDL是怎么编译的?你是交叉编译器必须交叉编译成库