[fpc-pascal] Calling C++ object

Josh.Bowden at csiro.au Josh.Bowden at csiro.au
Fri May 15 05:06:34 CEST 2009


Hi,

I am trying to call a C++ object which is in a dll from a Pascal interface unit as described in Rudy's Delphi corner: (http://rvelthuis.de/articles/articles-cppobjs.html). I use the inheritance method, making my C++ object a descendent from a Virtual ancestor.

I end up with run time errors in both fpc and the cross 64 bit compiler (my desired target is Win64):

error 210, (=R6025 - pure virtual function call)

However, the code works using Delphi. All my functions in my Pascal interface are 'virtual; stdcall; abstract; so the error makes sense, except that it works in Delphi.

I am wondering what are differences between Delphi and FPC that will not let me call C++ objects from DLL's? Or is there a command line switch I have missed that may help?

I use:
ppcrossx64 program_name.pas -vi -Sg -Si -Mfpc -OpATHLON64 -XD -Xs -B  -Rintel -Mdelphi -TWin64 -Cr
Thanks for any help with this.

Josh.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090515/bb27c1d2/attachment.html>


More information about the fpc-pascal mailing list