Create a wrapper around larger c-libraries

2022-04-24 Thread Alain De Vos via Digitalmars-d-learn
I'm currenlty experimenting about binding to C. I have : C-library: mylib.h: ``` void libprintme(char *s); ``` mylib.c: ``` #include #include "mylib.h" void libprintme(char *s){printf("%s",s);} ``` main.d: ``` extern(C) @nogc nothrow { void libprintme(char *s); alias pprintme=void

Re: Create a wrapper around larger c-libraries

2022-04-24 Thread Alain De Vos via Digitalmars-d-learn
``` void main(){dprintme("Hello\n");} } ```

Re: Create a wrapper around larger c-libraries

2022-04-24 Thread user1234 via Digitalmars-d-learn
On Sunday, 24 April 2022 at 15:13:15 UTC, Alain De Vos wrote: I'm currenlty experimenting about binding to C. I have : C-library: mylib.h: ``` void libprintme(char *s); ``` mylib.c: ``` #include #include "mylib.h" void libprintme(char *s){printf("%s",s);} ``` [...] Can this procedure be use