As Szymon noticed, you can compile an empty main into the static D library. The additional C main that is generated by DMD won't cause ambiguities as long as your C main is not also in a static library.
Thanks for the advice (I just found that myself). Why this workaround is not needed on Linux?
