gcc/ ld/ Mixing C++ objects from gcc and msvc : possible link ?

Jonathan Arnold jdarnold@buddydog.org
Fri Mar 11 21:10:00 GMT 2005


RzR www.rzr.online.fr wrote:
> But for C++ names, I doubt GCC can write a compatible MSVC "library
> stub" ( XYZ.lib that goes along XYZ.dll, not a static one : libXYZ.lib
> )
> 
> Maybe runtime linking with a dll  is possible ... I am investigating on this... 

Right, C++ name mangling breaks any kind of hope of linking together
multi-compiler object files. And it won't work in a DLL either.  The
way to do it is to write a C wrapper for your C++ code and export that
in your DLL.  And then to use that for your interface.

-- 
Jonathan Arnold     (mailto:jdarnold@buddydog.org)
Amazing Developments       http://www.buddydog.org

I feel like a fugitive from the law of averages. -
  William H. Mauldin


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list