One more thing: If your lib files are relative to your current working directory, then you can just pass them to DMD. E.g. if your lib file is under the subdir folder of your current working dir you can just use: dmd main.d subdir\mylibfile.lib But maybe you knew that already.