It should take the address of `_Dmain` not `main`. Also the declaration `extern(C) int _Dmain(char[][] args);` is missing.