On 09/04/2018 11:03 PM, Atila Neves wrote:
Here's my blog post about my project that allows directly #including C headers in D*

https://atilanevesoncode.wordpress.com/2018/04/09/include-c-headers-in-d-code/

The summary is that, modulo bugs, things like this work:

     #include <stdio.h>
     void main() { printf("Hello world\n".ptr); }

So far it's successfully compiled whilst #including pthread, libcurl, openssl and others. The blog and the github README have more information, and feel free to reply to this with questions.

dub: http://code.dlang.org/packages/dpp
reddit: https://www.reddit.com/r/programming/comments/8axj53/include_c_headers_in_d_code/
hacker news: It's in there somewhere, search around.

Atila

* Technically, "D + #include directives + C macros"

Any chance objectice-c as well?

Reply via email to