分享

main.o: could not read symbols: File in wrong format

 haliiz 2010-05-30
haliiz@haliiz-desktop:~/gps$ make
/usr/local/arm/4.3.2/bin/arm-linux-gcc  -o gps main.o gps.o
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: main.o: Relocations in generic ELF (EM: 3)
main.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [gps] 错误 1

haliiz@haliiz-desktop:~/gps$ make clean
rm -f gps *.o
haliiz@haliiz-desktop:~/gps$ make
/usr/local/arm/4.3.2/bin/arm-linux-gcc     -c -o main.o main.c
/usr/local/arm/4.3.2/bin/arm-linux-gcc     -c -o gps.o gps.c
/usr/local/arm/4.3.2/bin/arm-linux-gcc  -o gps main.o gps.o

haliiz@haliiz-desktop:~/gps$ ls
gps  gps.c  gps.h  gps.o  main.c  main.o  makefile  makefile01  makefile02


用make clean 就好了.
原因可能是在当前目录下有旧的文件。本次编译的时候由于硬件平台不同。格式认不出来了。


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多