[fpc-pascal]Re: Incompatible record alignment?
Gheorghe Stefan BERINDE
sberinde at math.ubbcluj.ro
Fri Jan 11 11:09:17 CET 2002
> > Hello all,
> > I encounter some difficulties when passing a record variable from
> > a FPC dynamic link library to a Delphi host program.
> > I try to align the record structure on 8-bit boundary for Delphi
> > compatibility, but it does'nt work properly. Do I make mistakes here?
> > You can test this with the following two little programs:
> packrecords takes the argument in bytes, not bits.
Ok, it was my typo error! I mean 8-bytes boundary alignment,
So, for the structure
type TPoint = record
the function SizeOf(TPoint) reports 32 bytes in FPC, since in
Delphi it reports 24 bytes (with the same 8-bytes alignment).
It seems for me that we have an incompatible records alignment
between these compilers.
Am I correct here?
More information about the fpc-pascal