[fpc-devel] VMT compatibility

Michael Van Canneyt michael at freepascal.org
Sun Jan 30 01:43:24 CET 2005



On Sun, 30 Jan 2005, Alexey Barkovoy wrote:

> >> I where any chance to see FreePascal generating VMT's for classes that is
> >> more compatible with C++ / TurboPascal / Delphi one?
> >> To explain mine question: recently I've been porting Delphi framework
> >> interfacing to C++ code to FPC and finded out that althrow Delphi VMT layout
> >> is compatible to C++ one, FPC is not.
> >
> > Are you sure Delphi is compatible to "C++" or just to Borland C++? The latter
> > would be logical, since both Delphi and C++ Builder use the same backend. Or
> > are Delphi classes also binary compatible with Visual C++ and g++ classes?
>
> Delphi is compatible at least with Borland C++ and MS VC++. And taking in accout
> how COM intefaces are implemented in C++ (I'm supposing here all C++ compilers
> support the same syntax) - each C++ compiler supporting MS way to declare COM
> interfaces has compatible VMT layout.

That would be true only for interfaces, not for straight VMTs ?

And Delphi's VMT's  are not compatible with GCC's;
At least, kylix cannot use GCC classes.
I'm not even sure they are compatible with the ones from MS Visual C++;


Michael.





More information about the fpc-devel mailing list