Along the same lines as pragma(lib,...) I'm wondering if it would make sense to add something like pragma(switch,...) also, e.g.: pragma(switch,"-version=MY_VERSION"); version(Windows) { pragma(switch,"-L/SUBSYSTEM:windows:5"); } That would act like the command-line: C:\>dmd foo.d bar.d version=MY_VERSION -L/SUBSYSTEM:windows:5