Error 'undefined reference to `_Dmain'' when compiling samples\d\winsamp.d. Workaround: a) add main() that calls myWinMain b) run objcopy for setting subsystem=windows and to get rid of the 'DOS window': objcopy --subsystem windows:5.00 winsamp.exe winsamp2.exe Example: http://dpaste.dzfl.pl/8698696f