Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <8D861ADC5B8FD211B4100008C71EA7DA04F70C0C@kjsdemucshrexc1.eu.pm.com> From: "Demmer, Thomas" To: "'cygwin AT cygwin DOT com'" Subject: Re: windows and cygwin compiled dll ? Date: Wed, 29 May 2002 08:21:44 +0200 MIME-Version: 1.0 Content-Type: text/plain > At 09:52 AM 5/28/2002, Stefan Hansen wrote: > > > At 07:32 AM 5/28/2002, Stefan Hansen wrote: > > > >Hi there, > > > > > > > >I want to add a, dll which I compiled under cygwin, to my MSVC++ > project. > > > >If I am correct I need a lib file of this dll. How can I create this > lib > > > >file ? > > > > > > > > > Why not just use the Cygwin .a import library? > > > >Linking whith .a (which i copy to .lib) is no problem. But during the > >execution i got an Access Violation. > > At which exact do you get the Access violation? I have noticed the > following > difference in linking cygwin code into Borland's Delphi: > Something like > > function malloc(size:Integer):pointer;cdecl;external 'cygwin1.dll' name > 'malloc'; > > bombs with a SIGSEGV at runtime. Also with functions in an own DLL that > call run-time functions that need proper initialization. > However, if I declare a pointer to a function, do a LoadLibrary('my.dll') > and get the > address of the function with GetProcAddress(handle,'myfunc'), everything > runs > fine. My dll initializes the cygwin1.dll properly. I have no idea why this > works, > as the Delphi startup code should be doing exactly the same thing, but I > guess > it has something to do with the correct entry points into cygwin1.dll. > I can send you a working example off-list, if you are interested. > > Ciao > Tom > > Thomas Demmer > Kraft Foods R&D Munich > Phone: +49 89 62738-6302 > Fax: +49 89 62738-86302 > > Thought of the Day: > Anyone who uses the phrase "easy as taking candy from a baby" has never > tried taking candy from a baby. > -- Robin Hood > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/