could not read symbols: File in wrong format collect2: ld 返回 1 make: *** [all] 错误 1

    xiaoxiao2022-06-22  24

    问题过程: 在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位的链接对象后再重新编译.

    转载请注明原文地址: https://ju.6miu.com/read-1122779.html

    最新回复(0)