Configuring GMP for Win32 DLL creation

Kevin Ryde user42@zip.com.au
Thu, 05 Jun 2003 01:10:12 +1000


"White, Jim (ITD)" <Jim.White@DEFRA.GSI.GOV.UK> writes:
>
> When GMP is configured to build Windows DLL's, the DLL's it produces can
> only be called by programs that use the Unix/C calling convention "cdecl". 

Actually it's purely a C convention, not unix as such.  The C
compilers on DOS do the same (by default).

> But other Win32 language environments, like Visual Basic (VB), Pascal,
> delphi, etc will probably be unable to use a cdecl DLL.

Sounds like a significant failing on their part.  Are you sure they're
completely unable to do cdecl?

> For example, it could be an option "WIN32DLL":

Hmm.  Perhaps as an ABI option.  The default will have to remain cdecl
for compatibility though.

Are you sure that everything falls into place just with such a change?
Presumably at least some trickery must be needed to get the size of an
mpz_t into your intended target language.