If you have a C file like: // enum.c enum Foo { FOO_0, FOO_1, FOO_2, }; which you convert to a .di file, it will contain (macro enums removed for brevity): extern (C) { enum Foo { FOO_0, FOO_1, FOO_2, } } Which is an incorrect translation. The imported C file will allow you to access the members of Foo without name spacing, like `FOO_0`, while the .di file will require you to write `Foo.FOO_0`. The enum members should be aliased into the module scope so that both imports function the same way. That is important as you might generate a .di file so your editor auto-complete works, but you want to compile with the actual .c file in case the code you are compiling against changes.
*** This issue has been marked as a duplicate of issue 24121 ***