This is the mail archive of the cygwin@cygwin.com 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: windows and cygwin compiled dll ?


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


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