日期:2014-05-16  浏览次数:20834 次

/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
我用arm-none-linux-gnueabi-gcc做交叉编译器,可总是编译不过去,错误提示如下:

gcc -shared .libs/dev2gif.o .libs/dgif_lib.o .libs/egif_lib.o .libs/gif_err.o .libs/gif_font.o .libs/gif_hash.o .libs/gifalloc.o .libs/qprintf.o .libs/quantize.o -Wl,-soname -Wl,libgif.so.4 -o .libs/libgif.so.4.1.6
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
.libs/dev2gif.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libgif.la] Error 1
make[2]: Leaving directory `/home/ema/lzq/giflib-qq4.1.6/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ema/lzq/giflib-qq4.1.6'
make: *** [all] Error 2


我试了很多方法,总是不成功,希望详解,谢谢~ ~ ~

------解决方案--------------------
那就试一下下面的方法吧:
./configure --host=你要运行程序的主机 CC=你用到的交叉编译链