The first library is Phobos, probably `-unittest` switch is needed to use its local imports. This code should build fine: m1.d: --- struct S1 { } // should be before `f1` void f1() { import std.ascii; } --- m2.d: --- struct S2 { } // should be before `f2` void f2() { import std.ascii; } --- Command (for Windows): --- dmd -unittest -lib m1.d dmd -unittest -lib m2.d m1.lib --- m2.lib: Error: multiple definition of format_c_5b3: _D9format.1212__ModuleInfoZ and format: _D9format.1212__ModuleInfoZ m2.lib: Error: multiple definition of format_c_5b3: __D9format.129__modtestFZv and format: __D9format.129__modtestFZv --- This is at least major issue as it breaks building libraries and doesn't give any clue of its reason.
So now probably because of this issue we have Issue 13774 which makes current Phobos almost unusable.
*** This issue has been marked as a duplicate of issue 13774 ***