It might help to add -Ix to dmd, which adds the x folder to your import search path. I haven't actually tried it though. I compile my D programs with all the files listed on the command line at once, I find it is simpler and often a little faster too.