title: Resolving LNK4098: defaultlib 'MSVCRT' conflicts with
body: <p>This warning:</p>
  
  <pre><code>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts
    with use of other libs; use /NODEFAULTLIB:library
  </code></pre>
  
  <p>is a fairly common warning in Visual Studio. I'd like to understand the exact reason for it and the right way (if at all) to handle it.</p>
  
  <p>This comes up in a debug build, compiled with <code>/MDd</code>. The project is linked to things like windows <code>Version.dll</code> and <code>pdh.dll</code> which themselves link with <code>MSVCRT.dll</code>. Obviously, I don't have the debug versions of these and can't compile them.  </p>
  
  <p>So I added <code>/NODEFAULTLIB:MSVCRT</code> to the linker command line and it actually did remove the warning. But what does this actually do? And why is it necessary?</p>