Shared library with C API
Kai Nacke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sun May 25 23:16:43 PDT 2014
On Sunday, 25 May 2014 at 10:27:50 UTC, Kagamin wrote:
> Should be possible:
>
> extern(C)
> int callme(int a)
> { return a; }
Yes, right.
There is nothing special in using LDC here. There is even a
recipe in the new D Cookbook on this topic (chapter 4, "Write
part of a C proram in D"). Don't forget to initialize the D
runtime from your C/C++ program.
Regards,
Kai
More information about the digitalmars-d-ldc
mailing list