Create C header files from

MaxNaderer maximilian.wallinger at gmail.com
Mon Feb 16 17:07:53 UTC 2026


Hello guys,

so how do we generate C header files automatically for a library 
compiled with dmd, ldc
in betterC. Like basic example below. I found the "-HC" flag 
which can be used to output C++ header files. Do I need to 
convert those manually to C?

```D

export extern(C) {

     uint add(uint a, uint b) {
         return a + b;
     }

}


More information about the Digitalmars-d-learn mailing list