I have main.d with: import foo.bar
and when I run: dmd foo/*.d main.d I get: module bar is in multiple defined This is pretty strange. The only way I can silence this error is to add "module dirname.filename" to *every* file. Surely there must be less annoying method?