Re: Win-GHC with GnuWin32 toolset--Mingw32 replacement
"Neil Mitchell" <[email protected]> Mon, 8 Jan 2007 16:20:59 +0000
| Newsgroups | gmane.comp.lang.haskell.cvs.all |
|---|---|
| Message-ID | <404396ef0701080820u27e40516rea84651ee99c0a9b__9269.62924791059$1168273384$gmane$org@mail.gmail.com> |
Hi > For the next step, the move to DLLs produced by NativeGen, GHC uses > what Windows calls the __cdecl calling convention (caller performs > stack cleanup, underscore '_' prepended to function name), while to > my knowledge DLLs require the __stdcall calling convention (callee > performs stack cleanup, same '_' prepended and commercial-at '@' and > number of bytes stack space appended). Windows supports __fastdecl, __cdecl and __stdcall equally. All the Windows API's are stdcall, apart from one or two functions which are cdecl (those which take variable argument lists). VB 6 can only do stdcall calls. Delphi by default does fastcall, Visual Studio by default does cdecl - both can call any of the 3. Some tools only work with stdcall, but most have a reasonably broad support. I'm not sure changing from cdecl is all that necessary. Thanks Neil