Am 25.09.2012 23:16, schrieb Henry Vermaak:
On 25 September 2012 20:57, Christo <[email protected]> wrote:
Any ideas on how to define the calling convention in the import unit so
that it is either stdcall or cdecl depending on the target OS?
I've used a macro for this in the past. E.g. :
{$macro on}
{$ifdef windows}
{$define CCONV:=stdcall}
{$else}
{$define CCONV:=cdecl}
{$endif}
Then use CCONV where you would specify the calling convention.
I would use "extdecl" instead of "CCONV" as the IDE and fpdoc has
special code to handle this (as they don't support macros).
Regards,
Sven
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal