> It should take the address of _Dmain not main

The symbol is referred to as "main" inside the D code.

> Also the declaration extern(C) int _Dmain(char[][] args); is missing.

No, it's not, as this code is compiled in the context of D main().