Re: Convert GCC under Cygwin Name Mangling to VC++ Name Mangling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting John Love-Jensen <eljay@xxxxxxxxx>:

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




Oh :(:( Thank you very much anyway, I hoped it could be possible. How can I do a
C edge for a C++ class? This class has 6 or 7 variables of types which are
defined inside the DLL so it's a bit complicated because the functions I need
to use in the class make use of these variables which have to be initialized at the beginning of the execution and it takes a long time (10 seconds) while the function takes less than 0.03 seconds. Time is important. If everything fails,
I will have to create a socket to communicate a gcc-compiled program with the
big VC++-compiled big project but I want to try everything before changing to
this solution.

Thanks and g'bye


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux