Shared library with C API

Chris via digitalmars-d-ldc digitalmars-d-ldc at
Mon May 26 07:10:45 PDT 2014

On Monday, 26 May 2014 at 12:50:59 UTC, Etienne Cimon wrote:
> On 2014-05-26 02:16, Kai Nacke wrote:
>> There is even a recipe in
>> the new D Cookbook on this topic (chapter 4, "Write part of a 
>> C proram
>> in D").
> I'm waiting to get my copy ;)
> > Don't forget to initialize the D runtime from your C/C++
> program.
> Would that mean I have to call rt_init() at the start of every 
> function?

Do you mean calling D from C(++)? Ideally you call rt_init() only 
once, that's what I did when I wrote Python modules in C that 
linked to D code (C was only a thin wrapper). But I don't know 
how your program / application is structured.

More information about the digitalmars-d-ldc mailing list