Sometimes I get libraries from different design teams. One uses gcc 3.x and another uses gcc 4.x. How can I identify whether these two libraries are compatible? I know it is something with libstdc++, but could you please give me a clear answer?
Asked
Active
Viewed 310 times
9
-
Adding C tag for more visibility and it is relevant even in C programming – Pavan Manjunath Apr 12 '12 at 10:16
-
http://stackoverflow.com/questions/2387040/how-to-retrieve-the-gcc-version-used-to-compile-a-given-elf-executable – Gaurav Shah Apr 12 '12 at 10:26
2 Answers
1
This is a good starting point
http://gcc.gnu.org/onlinedocs/gcc/Compatibility.html
This article discusses binary compatibility ( it can apply to libraries too ) between different tools. This still holds good when the different tools are differnt versions of gcc. One major thing to be checked is application binary interface (ABI) conformance.
And this SO post says that since GCC 3.4.0 ABI is forward compatible. I.E. a library made using an older release can be linked with a newer one and it should work .

Community
- 1
- 1

Pavan Manjunath
- 27,404
- 12
- 99
- 125