If I separately compile dfunc.d containing an exern(C) function, and cmain.c containing void main() that calls that function (after calling rt_init() to initialize druntime) and then ask dmd to link the resulting pair of objects into an executable, the linker complains that various symbols (including _rt_init) are not present, suggesting that (quite reasonably) dmd does not place druntime inside an arbitrary d object file. How to I ask dmd to link in druntime so as to get a working executable in this situation exemplifying a C application calling a D library function with C linkage?

Reply via email to