This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using DLLs created with different compilers


On Fri, Mar 07, 2003 at 03:23:06PM -0700, Singh, Diwakar V wrote:
> I have two different libraries - one compiled with GCC and another with
> a different, old compiler in Unix environment. Both these have C++
> classes defined in them. When I link these libraries to an application
> program that I created, I get a link error. This is because the name
> mangling scheme used by GCC is different from that used by the other
> compiler. Is there any option available to set the name mangling scheme/
> not enable the name mangling?

There's a lot that different besides name mangling.  Libraries compiled
by different C++ compilers can't be used together unless the compilers
both follow the same C++ ABI, and until recently there hasn't even been
a formal ABI for C++.

See http://gcc.gnu.org/onlinedocs/gcc/Compatibility.html#Compatibility
(part of the GCC Manual) for more information about this topic.

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]