<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial><SPAN
class=515264302-15052009>Hi,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=515264302-15052009></SPAN></FONT> </DIV>
<DIV><SPAN class=515264302-15052009><FONT size=2 face=Arial>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: (</FONT></SPAN><A
href="http://rvelthuis.de/articles/articles-cppobjs.html"><FONT size=2
face=Arial>http://rvelthuis.de/articles/articles-cppobjs.html</FONT></A><FONT
face=Arial><FONT size=2>)<SPAN class=515264302-15052009>. I use the inheritance
method, making my C++ object a descendent from a Virtual
ancestor.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>I end up with
run time errors in both fpc and the cross 64 bit compiler (my desired target is
Win64):</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>error 210,
(=R6025 - pure virtual function call)</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>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. </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>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?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>I
use:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>ppcrossx64
program_name.pas -vi -Sg -Si -Mfpc -OpATHLON64 -XD -Xs -B -Rintel -Mdelphi
-TWin64 -Cr<BR></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=515264302-15052009>Thanks for any
help with this.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009>Josh.</SPAN></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=515264302-15052009></SPAN></FONT></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>