On 25 September 2012 20:57, Christo <christo.cra...@gmail.com> 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. Henry _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal