Hi,
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. Let's see two examples: (1) is C++ and (2) is pascal one. In Delphi and C++ DoSomething method is located at ZERO offtet in VMT (i.e. PPointer(Self)^ == address of DoSomething). In FreePascal DoSomething is located with offset of 80 bytes (i.e. @PPChar(Self)^[80] == address of DoSomething).
(1) typedef class IMyClass { public: __cdecl virtual void DoSomething()=0; } *lpMyClass;
(2) type IMyClass = class(TObject) public procedure DoSomething; virtual; cdecl; abstract; end;
Regards, Alexey Barkovoy
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel