https://issues.dlang.org/show_bug.cgi?id=18412
--- Comment #5 from Walter Bright <bugzi...@digitalmars.com> --- If I create the .obj file with: dmd -c m2 and link the program works. If I create it with: dmd -lib m2 lib m2 *m2.obj; and link the program fails. Examining the two object files, the entire static constructor is missing from the second one. The two object files should be identical. --