From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Re: Does anyone succeed in calling a DLL from MSVC? 29 Jan 1999 23:09:06 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: claudio DOT pacchiega AT dianos DOT it Cc: gnu-win32 AT cygnus DOT com On Thu, 28 Jan 1999 claudio DOT pacchiega AT dianos DOT 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 AT 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 AT cygnus DOT com" with one line of text: "help".