Generating .di header files from ImportC files
Imperatorn
johan_forsberg_86 at hotmail.com
Sat Oct 21 18:33:39 UTC 2023
On Saturday, 21 October 2023 at 17:04:40 UTC, Walter Bright wrote:
> On 10/21/2023 1:12 AM, Imperatorn wrote:
>> Can you expand on how dmd can convert C to D? I didn't quite
>> get that part.
>
> DMD already has the capability to read in a .d file, then from
> the AST generate a .di file. Since ImportC gets turned into an
> AST, too, it can turn that AST into a .di file, too.
Nice, I just tried it and as long as you have your path setup
right, it works well :)
For others reading this, since I'm on Windows, I just opened the
developer command prompt and just ran:
dmd -c hashmap.c -Hf="hashmap.di"
And it just worked. Pretty impressive.
More information about the Digitalmars-d
mailing list