[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´s of methods
> from classes, not procedures. So I decided to study the task of
> linking from Free Pascal to C++
> Maybe it´s 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 demonstration 
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 examples. 
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 

I hope it's useful.

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/pipermail/fpc-devel/attachments/20070123/1db6a734/attachment.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/pipermail/fpc-devel/attachments/20070123/1db6a734/attachment-0001.bin>

More information about the fpc-devel mailing list