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.
Asked
Active
Viewed 109 times
0
-
It it like a wrong 32bit/64bit type? – Kerrek SB Aug 31 '12 at 07:20
-
1Is it unix? If so, you can check the file's format with the ``file`` command. It could just be the wrong architecture. – juanchopanza Aug 31 '12 at 07:22
-
What was the error given by GCC exactly? – fork0 Aug 31 '12 at 07:39
1 Answers
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
-
-
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