Undefined _D10TypeInfo_l6__initZ and _D15TypeInfo_Struct6__vtblZ added when instantiating template structs

Liran Zvibel via D.gnu d.gnu at puremagic.com
Mon Jan 26 09:50:58 PST 2015


Hi,

I would like to use some D code in a C binary
.
Part of the D functionality used is by instantiating templated 
structs.

Even if I just try to compile the following simple code:

extern (C) {
     alias mytpye = BLA!(int);
     struct BLA(T) {
         T x;
     }
}

With the following gcd flags:
-fno-invariants -fno-in -fno-out -fno-bounds-check -O3 
-fno-assert -c -nophoboslib  -nostdlib

I still have 3 undefined symbols:
_D10TypeInfo_i6__initZ _D15TypeInfo_Struct6__vtblZ _Dmodule_ref

I can alway just define them in the C glue code and get it over 
with, but I would like to understand what I SHOULD do to get it 
to easily link into a normal C executable.

Thanks!
Liran


More information about the D.gnu mailing list