https://issues.dlang.org/show_bug.cgi?id=17747
ZombineDev <petar.p.ki...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |betterC, C++ CC| |petar.p.ki...@gmail.com --- Comment #2 from ZombineDev <petar.p.ki...@gmail.com> --- AFAIK, C doesn't have static constructors, only C++ has, so your example should be: extern(C++) shared static this() { // ... } Of course extern (D) should work too: extern(D) shared static this() { // ... } I'm not sure if `pragma(mangle, ...) [shared] static this()` should be allowed as static constructors / destructors are meant to be called only once and only by the runtime. --