#include C headers in D code
Colin
grogan.colin at gmail.com
Mon Apr 9 12:56:55 UTC 2018
On Monday, 9 April 2018 at 11:03:48 UTC, 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"
This is very cool.
Gonna try it against gl.h tonight!
More information about the Digitalmars-d-announce
mailing list