Linking D code into existing C programs

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 28 01:21:45 PDT 2016


On Tuesday, 27 September 2016 at 12:58:36 UTC, Steven 
Schveighoffer wrote:
> Does it? your function seems to not require any druntime 
> features.
>
> I would say -betterC is the way to fix this, as conservatively 
> not emitting druntime requirements is probably a lot more 
> involved than a directive from the build that no druntime is 
> required.

LDC only emits one unresolved symbol _Dmodule_ref from module 
initializer and that's all, so it can be linked with, say, ld 
--defsym _Dmodule_ref=16


More information about the Digitalmars-d mailing list