Remember that if you're linking with Clang, it won't automatically link the druntime library because it assumes it's linking a C++ program. Make sure you add the D libraries to your link command if you intend to use the D runtime library.
Also, if your main function is in C++ like you show, then you need to init and term the D runtime library:
https://dlang.org/phobos/rt_dmain2.html#.rt_init ... Call those those at the start/end of your main function since C++'s startup/main won't do it for you.