This is the mail archive of the gcc-help@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: Convert GCC under Cygwin Name Mangling to VC++ Name Mangling


Hi Francisco,

Given your situation, it sounds like the bigger project is using MS Dev
Studio's Visual C++.

The GCC C++ ABI is not compatible with the MS Dev Studio VC++ ABI.

Either the bigger project will need to be compiled with GCC, or your
package-made-for-Linux will have to be compiled with MSVC++, or you will
have to create a C ABI edge that is the interface from the GCC C++ world to
the MSVC++ world.

The C ABI is compatible between the two compilers.  The C++ ABIs are not
compatible.

What does "not compatible ABI" mean in this context?  The RTTI is
incompatible, the exception handling is incompatible, the name mangling is
incompatible, the parameter pushing is incompatible, the calling convention
is incompatible, the stack clean up is incompatible, the stack unwinding is
incompatible, and probably a handful of other catastrophic differences.

If you write a C edge, you cannot leak RTTI information, or throw an
exception past the C barrier (instant program termination), et cetera.

HTH,
--Eljay


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