This is the mail archive of the mailing list for the Cygwin 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: cygwin C++ DLLs and inter-operation with M$OFT

At 05:58 AM 2/13/2002, Dylan Cuthbert wrote:
>To anyone who can help,
>We've been having some fun creating DLLs that need to be loaded by some
>Visual C++ code.  The code in the dll itself, ie. the interface is C so
>there aren't any name mangling problems.  However, using v3.0.3 of GCC we
>get unresolved symbol errors for any libstdc++ we do within the dll.  These
>errors don't occur after using the -V 2.95.3-5 option to gcc to revert to
>the originally packaged compiler - I had a good poke around but I couldn't
>work out why the symbols couldn't be resolved.
>Anyway, after reverting to 2.95.3-5, our test code compiles but when we call
>any cygwin dll code (from the VS application) we get an exception error in
>cygwin1.dll - if the code uses any stdlib type stuff (such as memory
>allocation, printf etc).  There is no C++ code in there at all now.
>I've read through the faqs and documentation and searched the mailing list
>but I can't find any fixes for this problem (although a couple of other
>people do mention it).  Is there just some obvious initialisation stuff I'm
>missing somewhere?

Probably.  This has been mentioned in the past.  You want to look at the 
Cygwin initialization code to see what happens there.  It needs to happen
when the DLL is loaded by non-Cygwin apps as well.  Some of this may come
for free at this point.  Discussion of this issue was quite some time ago
(check the developer email archives if you're curious) and I don't remember
the final consensus and/or changes.  But, the archives should have the 
history and the startup code should give you a hint of the current state.

Larry Hall                    
RFK Partners, Inc.            
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX

Unsubscribe info:
Bug reporting:

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