This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using DLLs created with different compilers
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: "Singh, Diwakar V" <diwakar dot v dot singh at intel dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 7 Mar 2003 16:40:40 -0800
- Subject: Re: Using DLLs created with different compilers
- References: <8725EA4B6B36CB4981C8B3B23E5F093214D022@azsmsx404.ch.intel.com>
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