[fpc-pascal] C++ and Free Pascal

Bob Shaffer freepascal at bobshaffer.net
Wed Mar 16 00:58:03 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?

If I could rewrite my library in pascal and then link it to a C++ program,
it wouldn't be so bad.  I would have to rewrite it all, yes - but I
wouldn't have to maintain two nearly identical libraries.

 Bob Shaffer II  -  Owner, Developer, System Operator  -  BobShaffer.net
  Website: http://bobshaffer.net/          BBS: telnet://bobshaffer.net

More information about the fpc-pascal mailing list