[fpc-pascal] bridging an C++ shared library statically
Sven Barth
pascaldragon at googlemail.com
Mon Sep 23 11:17:02 CEST 2013
Am 23.09.2013 10:53, schrieb Michael Schnell:
> On 09/21/2013 04:04 PM, Xiangrong Fang wrote:
>> Hi All,
>>
>> I need to use a C++ so file in FreePascal
>
> AFAIK, you only can use C++ libraries in Pascal, if the functions for
> the mutual interface are "flat" C function (i. e. ANSI C functions not
> using any C++ classes). Of course, on top of this in both source codes
> the same ABI spec needs to be defined (e.g. "PASCAL" or "STDCALL").
You know that he wrote this the following as well (directly after your
quote ends)?
> I have written a C wrapper for it, which successfully connected to Pascal.
He only has problems LINKING the library and here it does not matter
whether the library is written in C or C++.
Regards,
Sven
More information about the fpc-pascal
mailing list