Recent

Author Topic: C/C++ libraries  (Read 414 times)

Borneq

  • Full Member
  • ***
  • Posts: 238
C/C++ libraries
« on: December 25, 2019, 02:31:45 pm »
How to best use static C/C++ libraries? I have c sources and can customize it (for example name mangling)

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: C/C++ libraries
« Reply #1 on: December 25, 2019, 03:23:08 pm »
How to best use static C/C++ libraries? I have c sources and can customize it (for example name mangling)
What do you mean by "best"?
Anyway, other than you have to use plain C interface, I'd recommend to use shared library instead, otherwise you have to bring all
C++'s internal dependencies to Pascal (being a host application) side.

Probably you want to read this topic: https://forum.lazarus.freepascal.org/index.php/topic,46556.0.html

p.s. Although I'm currently working on similar application (C++ library wrapped to C, and then used in Pascal), my experience with the subject is not very profound, it's rather of "trial and error" kind.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

 

TinyPortal © 2005-2018