<div dir="ltr">Everything worked. Thanks.<div><br></div><div>And here are the tests:</div><div><br></div><div><div>C:\Tests\Build2\hello\clang-6>b</div><div>c++ ../hello/cxx{hello}</div><div>ld exe{hello}</div><div>hello.exe.obj : warning LNK4217: locally defined symbol __std_terminate imported in function "int `public: static unsigned __int64 __cdecl std::char_traits<char>::length(char const * const)'::`1'::dtor$2" (?dtor$2@?0??length@?$char_traits@D@std@@SA_KQEBD@Z@4HA)</div><div>hello.exe.obj : warning LNK4217: locally defined symbol _CxxThrowException imported in function "public: void __cdecl std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QEAAXH_N@Z)</div><div><br></div><div>C:\Tests\Build2\hello\clang-6>hello</div><div>Hello</div><div><br></div><div>C:\Tests\Build2\hello\clang-6>b clean<br></div><div>rm exe{hello}</div><div>rm obje{hello}</div><div><br></div><div>C:\Tests\Build2\hello\clang-6>b config.cc.poptions=-D_DLL ^</div><div>Mais? config.cc.coptions=-nostdlib ^</div><div>Mais? config.cc.loptions=/DEFAULTLIB:msvcrt.lib</div><div>c++ ../hello/cxx{hello}</div><div>ld exe{hello}</div><div>LINK : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library</div><div><br></div><div>C:\Tests\Build2\hello\clang-6>hello</div><div>Hello</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 8, 2017 at 3:18 PM, Boris Kolpackov <span dir="ltr"><<a href="mailto:boris@codesynthesis.com" target="_blank">boris@codesynthesis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Username I Wanted Was Already Taken <<a href="mailto:usernameiwantedwasalreadytaken@gmail.com">usernameiwantedwasalreadytake<wbr>n@gmail.com</a>> writes:<br>
<br>
> [...] -defaultlib:libcmt<br>
<br>
Ok, that's the missing piece. I've fixed and staged the new version,<br>
can you give it a try?<br>
<br>
If it works, just for interest's sake can you try the shared runtime<br>
build:<br>
<br>
b config.cc.poptions=-D_DLL    ^<br>
  config.cc.coptions=-nostdlib ^<br>
  config.cc.loptions=/<wbr>DEFAULTLIB:msvcrt.lib<br>
<br>
The idea taken from here:<br>
<br>
<a href="https://stackoverflow.com/questions/41850296/link-dynamic-c-runtime-with-clang-windows" rel="noreferrer" target="_blank">https://stackoverflow.com/<wbr>questions/41850296/link-<wbr>dynamic-c-runtime-with-clang-<wbr>windows</a><br>
<br>
<br>
> By the way, those "locally defined symbol" warnings are referenced here:<br>
> <a href="https://stackoverflow.com/questions/42545078/clang-version-5-and-lnk4217-warning" rel="noreferrer" target="_blank">https://stackoverflow.com/<wbr>questions/42545078/clang-<wbr>version-5-and-lnk4217-warning</a><br>
<br>
That looks like Clang's issue (if that option is the correct fix then<br>
Clang should be adding it by default). You may want to submit a bug<br>
report at <a href="http://bugs.llvm.org" rel="noreferrer" target="_blank">bugs.llvm.org</a>.<br>
<br>
Thanks,<br>
Boris<br>
</blockquote></div><br></div>