问题过程: 在64位的操作系统上重新编译c程序遇到以下报错,
[root@hb hostinfo]# make
gcc -shared hbla_hostinfo.o -g -o libhbla_hostinfo.so -fPIC
hbla_hostinfo.o: could not read symbols: File in wrong format
collect2: ld 返回 1
make: * [all] 错误 1
原因: 平台不一样,如删除32位链接对象和库,重新编译位64位,来解决(File in wrong format),
解决方案: 先make clean 然后再make 或者手动删除32位的链接对象后再重新编译.
作者:daxian001
来源:CSDN
原文:https://blog.csdn.net/u013101173/article/details/52535073
版权声明:本文为博主原创文章,转载请附上博文链接!