Mixing libraries from different compilers

View: New views
2 Messages — Rating Filter:   Alert me  

Mixing libraries from different compilers

by bkqdad :: Rate this Message:

| View Threaded | Show Only this Message


I am using the 3.2.3 g++ compiler.  I recently received a library I need to integrate which is using gcc 4.1.1. Is this allowed?  What issues might I face?  Will it be stable?  Also, I need to integrate the same library into a solaris executable.  We compile using forte 6.2, the library we received is compiled with gcc 4.1.1 (on solaris).  Same questions.

Thanks for any/all help

Re: Mixing libraries from different compilers

by John (Eljay) Love-Jensen :: Rate this Message:

| View Threaded | Show Only this Message

Hi bkqdad,

If the library is a C library (which uses the C ABI), you should be okay.

If the library is a C++ library (which uses a C++ ABI), you need to get GCC
4.1.1 of the C++ (g++) compiler for your project, or have the provider of
the library compile their library using GCC 3.2.3 of the C++ (g++) compiler.

HTH,
--Eljay