当前位置: 技术问答>linux和unix
/usr/bin/ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
来源: 互联网 发布时间:2017-04-25
本文导语: 我用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...
我用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
我试了很多方法,总是不成功,希望详解,谢谢~ ~ ~
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=你用到的交叉编译链
./configure --host=你要运行程序的主机 CC=你用到的交叉编译链
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。