Can I create static c callable library?

9il ilyayaroshenko at gmail.com
Wed Sep 26 03:53:25 UTC 2018


On Tuesday, 25 September 2018 at 11:03:11 UTC, John Burton wrote:
> I need to write a library to statically link into a c program.
> Can I write this library in D?
> Will I be able to use proper D abilities like gc? Obviously the 
> public interface will need to be basic c callable functions...
>
> I 'main' is a c program will this work?

Yes, for example https://github.com/libmir/mir-optim
It has *.cpp example.


More information about the Digitalmars-d-learn mailing list