This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem using cygwin compiled DLL's in other Windows apps
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- 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
- Date: Tue, 08 Jan 2002 20:35:13 -0500
- Subject: Re: Problem using cygwin compiled DLL's in other Windows apps
- References: <3C3B6DF9.2271CF32@datacurrent.com> <031001c19896$92913230$0200a8c0@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
> ----- Original Message -----
> From: "Logan Bowers" <email@example.com>
> To: <firstname.lastname@example.org>
> Sent: Wednesday, January 09, 2002 9:08 AM
> Subject: Problem using cygwin compiled DLL's in other Windows apps
>>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
>>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
>>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
>>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
>>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.
>>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>>Bug reporting: http://cygwin.com/bugs.html
> 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