Generating C Headers From D Code

Adam D Ruppe destructionator at gmail.com
Fri Aug 6 15:57:49 UTC 2021


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 
might get you somewhere.

A long time ago i made a program called dtoh that did it from the 
generated json but like i think that broke years ago, i haven't 
touched it for ages. can't find it anymore. dmd -HC surely better 
anyway.



More information about the Digitalmars-d-learn mailing list