title: Link dynamic C runtime with clang (windows)
body: <p>Clang on windows (using msvc libs) links with <code>libcmt</code> (the static runtime library) by default. Is there an easy way to link with the dynamic library (<code>msvcrt</code>)?</p>
  
  <p>Normally, clang adds <code>-defaultlib:libcmt</code> to the linker command, which links the program to the static runtime. This occurrs even if the source file is blank.</p>
  
  <p>The way I've found you can is by adding the options <code>-Wl,-nodefaultlib:libcmt -D_DLL -lmsvcrt</code> to override the default. However, this seems quite awkward. Is there a better way of linking the dynamic runtime than this?</p>