[fpc-pascal] Linking statically C code with stdcall functions

Marco van de Voort marcov at stack.nl
Fri Mar 5 14:19:13 CET 2010

In our previous episode, Henry Vermaak said:
> > But the system libraries using stdcall do not use it, so apparantly it is
> > turned off there. It makes more sense to make stdcall adhere to the system
> > calling convention than the MSVC mangled version one. (that'd be a new
> > modifier)
> It's a bit useless if you can't link to any other libraries, no? 

You can, you just have to specify the decoration. Or if there is a large
scale need a modifier or directive to modify stdcall to include decoration
could be made by interested parties.

> I guess you can still use ld instead of the internal llinker (and even
> import libs).

I'd just add the decoration manually. It is typically a one-off effort.

More information about the fpc-pascal mailing list