当前位置: 技术问答>linux和unix
使用autotools生成makefile,最后一步交叉编译时make出错
来源: 互联网 发布时间:2016-08-07
本文导语: 下面是错误信息: [root@ns fp_linux]# make make all-am make[1]: Entering directory `/myFP/fp_linux' /usr/local/arm/3.4.1/bin/arm-linux-g++ -g -O2 -o exebinary FPA.o global.o ma in.o /usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux...
下面是错误信息:
[root@ns fp_linux]# make
make all-am
make[1]: Entering directory `/myFP/fp_linux'
/usr/local/arm/3.4.1/bin/arm-linux-g++ -g -O2 -o exebinary FPA.o global.o ma
in.o
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld
: FPA.o: Relocations in generic ELF (EM: 3)
FPA.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [exebinary] Error 1
make[1]: Leaving directory `/myFP/fp_linux'
make: *** [all] Error 2
Makefile.am文件中是这样的:
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=exebinary
exebinary_SOURCES=FPA.h FPA.cpp global.h global.cpp main.cpp
[root@ns fp_linux]# make
make all-am
make[1]: Entering directory `/myFP/fp_linux'
/usr/local/arm/3.4.1/bin/arm-linux-g++ -g -O2 -o exebinary FPA.o global.o ma
in.o
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld
: FPA.o: Relocations in generic ELF (EM: 3)
FPA.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [exebinary] Error 1
make[1]: Leaving directory `/myFP/fp_linux'
make: *** [all] Error 2
Makefile.am文件中是这样的:
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=exebinary
exebinary_SOURCES=FPA.h FPA.cpp global.h global.cpp main.cpp
|
FPA.o: could not read symbols: File in wrong format
相同的一份源码,是否使用其他编译器编译过?
如果是,需要先清理一下。
相同的一份源码,是否使用其他编译器编译过?
如果是,需要先清理一下。
|
同意楼上的,
先清理一下工程。
make clean
然后再make
先清理一下工程。
make clean
然后再make