[fpc-pascal] C++ and Free Pascal

Peter Vreman peter at freepascal.org
Wed Mar 16 07:55:55 CET 2005


> While searching the web for the answer to a somewhat common question:
> Is it possible to link C++ libraries to Free Pascal programs?
> I came across a reply on this mailing list.  The answer is no, and it
> won't probably be possible any time soon.  The suggestion I read there was
> fairly simple.  Rewrite the library in Free Pascal.  While I don't
> particularly want to do that, it did make me wonder about something else:
>
> Is it possible to link Free Pascal to C++?
> A little more specifically, is it possible to use object-oriented pascal
> code in a C++ program?

Only with a wrapper unit that exports only normal functions/procedures
(not methods) declared with cdecl it'll be possible.








More information about the fpc-pascal mailing list