0

I have got a abc.so lib from somewhere, while using gcc4.4.3 I got error that this abc.so is incompatible type. Any idea how to find the version of this lib.

Coding Mash
  • 3,338
  • 5
  • 24
  • 45

1 Answers1

0

Under Unix :

List the strings from the binary, and simply grep the GCC version :

 strings -a <binary>| grep "GCC:"

This will give you the GCC version used to build the binary. But I'm not really sure it's what you want to know. You can also get more informations about the binary by using readelf -h <binary>

phsym
  • 1,364
  • 10
  • 20
  • I am trying to link a dynamic library and getting this error : "file not recognized: File format not recognized". I am not very sure what is going wrong. So trying my luck with gcc version. But no use. Any idea what should I do. – user1637941 Aug 31 '12 at 07:58
  • What is the output of `file ` ? – phsym Aug 31 '12 at 08:00
  • abc.so : : ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped – user1637941 Aug 31 '12 at 08:03
  • strings -a | grep "GCC:" is working fine. but I think problem lies somewhere else. – user1637941 Aug 31 '12 at 08:22
  • Are you sure the binary has been compiled for your architecture ? What's your system arch ? – phsym Aug 31 '12 at 08:53