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