<div dir="ltr">Remember that if you're linking with Clang, it won't automatically link the druntime library because it assumes it's linking a C++ program. Make sure you add the D libraries to your link command if you intend to use the D runtime library.<div>Also, if your main function is in C++ like you show, then you need to init and term the D runtime library: <a href="https://dlang.org/phobos/rt_dmain2.html#.rt_init">https://dlang.org/phobos/rt_dmain2.html#.rt_init</a> ... Call those those at the start/end of your main function since C++'s startup/main won't do it for you.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 24, 2020 at 10:30 AM Ruby The Roobster via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wednesday, 23 September 2020 at 23:45:38 UTC, Manu wrote:<br>
> Except, you should use `extern(C++)` in your D code, and no <br>
> need to extern in your C++ code.<br>
<br>
Thanks.<br>
</blockquote></div>