[fpc-devel] VMT compatibility

DrDiettrich drdiettrich at compuserve.de
Sun Jan 30 01:55:38 CET 2005

Alexey Barkovoy wrote:

> 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.

The layout of C++ classes is compiler specific. In so far BCB and MSVC
may be compatible, or MSC and BC, but only for specific compiler

OPL (fpc, Delphi...) classes are different from C++ classes, not only in
the VMT layout, but also in other significant details. That's why BCB
provides special support for TObject based classes, but these classes
still are different from the C++ classes.

COM (ActiveX...) is not related to C++, it defines another object model,
data types, and class layout.

If you really need portable classes, then you should use COM/ActiveX on
Windows, or possibly CORBA for more platform independence. Though I
don't know whether fpc supports CORBA?


More information about the fpc-devel mailing list