sunworld 发表于 2010-08-28 14:55

Id link error

编译程序用g++。连接时,遇到错误:File format not recognized。 could not read symbols. Collect2 exits.

1. 不知道这是什么原因?
2. 怎么检查编译/程序存在的可能问题?
3.一般应该怎么解决?

谢谢赐教

prolj 发表于 2010-08-28 18:28

不是elf

EricFisher 发表于 2010-08-28 20:54

用file命令看看文件格式

sunworld 发表于 2010-08-28 22:18

用file和nm命令查看*.o,是32位ELF。

而且出现问题的库是当场编译的。

很是奇怪,不知有哪位高手能赐教?

谢谢

sunworld 发表于 2010-08-28 22:26

ar -x libttt-g.a
file *
得到 ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped

纳闷的是,ld(2.18) 说:
could not read symbols: File format not recognized
collect2: ld returned 1 exit status
页: [1]
查看完整版本: Id link error