试图执行“make”。我已经检查了工具链目录,这很好,因为我尝试成功编译了其他文件。想知道此错误的原因以及在哪里检查解决方案。

-rwxrw-rw- 1 ayaz ayaz  7246 Dec 17 23:33 csi_fun.c
-rwxrw-rw- 1 ayaz ayaz  2133 Dec 17 23:33 csi_fun.h
-rwxrw-rw- 1 ayaz ayaz  4488 Dec 17 23:33 csi_fun.o
-rwxrw-rw- 1 ayaz ayaz  3881 Dec 17 23:33 main.c
-rwxrw-rw- 1 ayaz ayaz  4024 Dec 17 23:33 main.o
-rwxrw-rw- 1 ayaz ayaz   399 Dec 22 15:46 Makefile
-rwxrw-rw- 1 ayaz ayaz 13580 Dec 17 23:33 recv_csi


ayaz@ubuntu:~/Atheros_CSI_tool_OpenWRT_UserSpaceApp_src-master/recvCSI$ make
mips-openwrt-linux-gcc csi_fun.o main.o -o recvCSI
/home/ayaz/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.16/lib/gcc/mips-openwrt-linux-musl/5.3.0/../../../../mips-openwrt-linux-musl/bin/ld: csi_fun.o: Relocations in generic ELF (EM: 62)
/home/ayaz/openwrt/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.16/lib/gcc/mips-openwrt-linux-musl/5.3.0/../../../../mips-openwrt-linux-musl/bin/ld: csi_fun.o: Relocations in generic ELF (EM: 62)
csi_fun.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make: *** [recvCSI] Error 1

最佳答案

重新安装工具链目录后已解决

08-16 02:18