D Bindings for C Opaque Pointers

bachmeier no at spam.net
Thu Dec 3 01:19:05 UTC 2020


On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham wrote:

> What did I do wrong in constructing the bindings? If it helps 
> the library provides a function called EdsRelease for 
> cleaning-up allocated objects. Is the management of pointers 
> between D and C the issue? Please forgive me if I've mangled 
> that concept.

Not an answer to your question, but the "idiomatic" approach is 
to not write bindings yourself.

dstep generates bindings: https://github.com/jacob-carlborg/dstep

dpp lets you include C header files directly: 
https://github.com/atilaneves/dpp


More information about the Digitalmars-d-learn mailing list