delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/29/02:23:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <TDemmer AT krafteurope DOT com>
To: "'cygwin AT cygwin DOT com'" <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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019