Trying to link an MSVC DLL with a Cygwin Application

Jörg Schaible joerg.schaible@gmx.de
Wed May 5 16:58:00 GMT 2004


Please keep replies on the list!

On Wednesday 05 May 2004 09:31, you wrote:
Jt> Jörg Schaible wrote:
Jt>
Jt> > john george wrote:
Jt> >
Jt> >
Jt> >>Can i resolve the name mangling issue by adding the
Jt> >>extern "C" declaration for every function that I'm
Jt> >>exporting in the MSVC created DLL.
Jt> >>I tried this but doesn't seem to work.Is there any
Jt> >>other way to do this.
Jt> >
Jt> >
Jt> > Be aware, that there is more than just a compatible call. You have to
Jt> > recognize, that you have two different RT-libs and therefore also two
Jt> > memory managers. Said that, you cannot allocate memory from the first
 one Jt> > and set it free on the second. While this is quite obvious with
 malloc and Jt> > friends, you have also to take care of strdup or fopen or
 ...
Jt>
Jt> Aren't cygwin given pointers and msvcrt given pointers interchangeable..?
Jt>
Jt> Well I'm not going to try it but it could be handy to know...

This has nothing to do with Cygwin itself, but is true for any combination of 
different RT-Libs (Cygwin, MS, Borland, ...)

Regards,
Jörg

--
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