Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-06

Can a C++ program use a freepascal object?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth
to Xiangrong Fang
Xiangrong Fang wrote 5 lines
Hi, I am playing with CURL in FPC. My question is, if I write a wrapper for curl, e.g. TEasyCURL, is it possible to put this class into a shared library and let a C++ program use it (either static or dynamic link)?

No, as C++ and FPC classes have a different layout of the internal class structures which point to their methods and fields.

Regards,
Sven

Reply by email

Xiangrong Fang
to leledumbo

I know this, just wanted to share fpc object with cpp . ::-) ? 2012-6-6 ??10:46?"leledumbo" ???

Show quoted text 14 lines
Yes, using C style procedural interface. You have to (un)wrap the object oriented code on both sides. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Can-a-C-program-use-a-freepascal-object-tp4024363p4024368.html Sent from the Free Pascal - Lazarus mailing list . -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120606/e917bf00/attachment.html>

Reply by email