[fpc-devel] Linking to C++
Christian Iversen
chrivers at iversen-net.dk
Tue Jan 23 22:35:38 CET 2007
On Monday 22 January 2007 20:17, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I was studing how to write the system unit for Symbian OS, and
> everything on Symbian is C++, so you actually import lot=B4s of methods
> from classes, not procedures. So I decided to study the task of
> linking from Free Pascal to C++
>
> Maybe it=B4s easy to be implemented, and that would be very nice. Here is=
my
> test:
I "solved" this problem some time ago. I've put together a small demonstrat=
ion =
of how to link a complete C++ class to a pascal program, _without_ using a =
C-style wrapper (because /that/, anybody can do!)
I've attached two small zipfiles to this mail, which gives two such example=
s. =
One is for linking to existing programs, and the other is for creating =
interfaces suitable for using across several languages with minimal trouble=
. =
The interface example needs a little more work, but shows the basic =
principle.
I hope it's useful.
-- =
Regards,
Christian Iversen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp-link-example.zip
Type: application/x-zip
Size: 8227 bytes
Desc: not available
Url : http://lists.freepascal.org/lists/fpc-devel/attachments/20070123/1db6=
a734/cpp-link-example-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp-link-interfaces.zip
Type: application/x-zip
Size: 2517 bytes
Desc: not available
Url : http://lists.freepascal.org/lists/fpc-devel/attachments/20070123/1db6=
a734/cpp-link-interfaces-0001.bin
More information about the fpc-devel
mailing list