Re: Generating C Headers From D Code

2021-08-06 Thread Adam D Ruppe via Digitalmars-d-learn
On Thursday, 5 August 2021 at 16:28:35 UTC, Jack Stouffer wrote: I know the compiler has C++ header generation Your best bet is probably to use this and just do the slight modifications to turn it from C++ into C. dmd -HC followed by a modification script to rip some of the stuff out

Re: Generating C Headers From D Code

2021-08-06 Thread Jack Stouffer via Digitalmars-d-learn
On Thursday, 5 August 2021 at 17:02:33 UTC, Tejas wrote: On Thursday, 5 August 2021 at 16:28:35 UTC, Jack Stouffer wrote: I need to generate plain C99 .h files from a D module's extern(C) declarations, so that I can link a DMD generated .o file with a C code base. Are there any automated tools

Re: Generating C Headers From D Code

2021-08-05 Thread Tejas via Digitalmars-d-learn
On Thursday, 5 August 2021 at 17:02:33 UTC, Tejas wrote: On Thursday, 5 August 2021 at 16:28:35 UTC, Jack Stouffer wrote: [...] I also can't find anything... until someone else comes with a better answer, maybe you can do this: Use the ```-H``` compiler flag to generate ```.di``` files.

Re: Generating C Headers From D Code

2021-08-05 Thread Tejas via Digitalmars-d-learn
On Thursday, 5 August 2021 at 16:28:35 UTC, Jack Stouffer wrote: I need to generate plain C99 .h files from a D module's extern(C) declarations, so that I can link a DMD generated .o file with a C code base. Are there any automated tools which do this? I know the compiler has C++ header

Generating C Headers From D Code

2021-08-05 Thread Jack Stouffer via Digitalmars-d-learn
I need to generate plain C99 .h files from a D module's extern(C) declarations, so that I can link a DMD generated .o file with a C code base. Are there any automated tools which do this? I know the compiler has C++ header generation, and there's tons of tools which exist for importing C