From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: Does anyone succeed in calling a DLL from MSVC?
29 Jan 1999 23:09:06 -0800
Message-ID: <Pine.SUN.3.93.990129102344.11065K-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <C1256707.006050E4.00@avalon.dianos.it>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: claudio.pacchiega@dianos.it
Cc: gnu-win32@cygnus.com

On Thu, 28 Jan 1999 claudio.pacchiega@dianos.it wrote:

> I'm getting more and more frustrated in my attempt to link a Cygnus dll
> from a
> MSVC6 procedure (i tried so far just a plain vanilla console win32
> application from msvc).

I've posted descriptions on how to do this in the past, and so I won't
repeat it here. Here's what I've done for small test codes:
  
  $ dllwrap --entry __cygwin_noncygwin_dll_entry@12 -o foo.dll \
    --export-all --add-stdcall-alias [object files] [libraries needed]

Then just use LoadLibrary to load the Cygwin DLL from your MSVC app. 

You cannot really *link* the DLL into MSVC since they're not compatible 
at the *link* level; it might work, and then again it might not.

Perhaps you could ask Microsoft to make MSVC more compatible with Cygwin;
they listen to the customers, right ;-)

Note that there is a subtle and nasty bug in GCC that causes STDCALL
functions to misbehave when the return type is float or double. It
only affects STDCALL functions.

Regards,
Mumit


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
