delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/08/20:37:08

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
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C3B9E51.6090608@ece.gatech.edu>
Date: Tue, 08 Jan 2002 20:35:13 -0500
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
CC: Logan Bowers <logan AT datacurrent DOT com>, cygwin AT cygwin DOT com
Subject: Re: Problem using cygwin compiled DLL's in other Windows apps
References: <3C3B6DF9 DOT 2271CF32 AT datacurrent DOT com> <031001c19896$92913230$0200a8c0 AT lifelesswks>


Robert Collins wrote:

> You'll need to compile and link with -mno-cygwin - winamp uses a
> different C runtime that Cygwin.


Actually, Rob is assuming that you are using gcc to do the link phase. 
Usually, it's better to let gcc take care of all that mess for you -- 
and -mno-cygwin is a gcc option that causes gcc to call ld differently.

So, to build your dll, instead of 'ld -shared ...' do 'gcc -mno-cygwin 
-shared ...'.

--Chuck


> 
> Rob
> ===
> ----- Original Message -----
> From: "Logan Bowers" <logan AT datacurrent DOT com>
> To: <cygwin AT cygwin DOT com>
> Sent: Wednesday, January 09, 2002 9:08 AM
> Subject: Problem using cygwin compiled DLL's in other Windows apps
> 
> 
> 
>>Hello,
>>
>>I'm having a nasty problem that's got me posivively stumped.  I've
>>written a Winamp plugin (a DLL) using Cygwin.  Winamp properly loads
>>
> the
> 
>>DLL (at runtime), but whenever my DLL attempts to make a system call
>>(such as open()), Winamp crashes.  I have no idea how to trace this
>>
> kind
> 
>>of problem down.  Does anyone know what might be causing this or have
>>general advice on writing DLLs using cygwin that need to be loadable
>>into regular Windows apps?  I wrote a simple test program that uses
>>dlopen() to load the dll (and ran it from within the cygwin
>>
> environment)
> 
>>and it works without hitch.  If necessary, I can put the build script
>>and code online.
>>
>>Also, one other minor thing, I need to export a single function:
>>winampGetOutModule.  gcc, however, likes to mangle that into
>>winampGetOutModule__Fv.  The only way I could get it to export under
>>
> the
> 
>>proper name was to first compile to assembly and then use perl to get
>>rid of the __Fv.  Is there an easier way to do this?  Thanks.
>>
>>
>>Logan Bowers
>>
>>--
>>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/
>>
>>
>>
> 
> 
> --
> 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/
> 
> 



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