[fpc-pascal] DLL and SO with Free Pascal
Michael Van Canneyt
michael at freepascal.org
Sun Apr 9 16:11:43 CEST 2006
On Sun, 9 Apr 2006, Jilani Khaldi wrote:
>
> > It would be helpful if you could tell what exactly the problem is.
> >
> > But from first glance, you need at least to add {$mode objfpc} or {$mode
> > delphi}
> > so integer is 32-bit instead of 16 bit. Secondly, normally you should
> > add a {$packrecords C}
> >
> >
> Thank you very much Michael, you hint to add "{$packrecords C}" fixes the
> problem.
> Just curious. I tried:
> SpaData = packed record
> ...
> end;
>
> instead of:
> SpaData = record
> ...
> end;
>
> But it doesn't solve the problem.
No, because C doesn't use the 'packed record'. It uses a special alignment
algorithm, which is imitated by $PACKRECORDS C
Michael.
More information about the fpc-pascal
mailing list