Subject: Re: Does anyone succeed in calling a DLL from MSVC?
From: [email-masked] (Mumit Khan)

29 Jan 1999 23:09:06 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]
Cc: [email-masked]

On Thu, 28 Jan 1999 [email-masked] 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
"[email-masked]" with one line of text: "help".