title: Linking debug application (MDd runtime library) with a release static library (MD runtime library)
body: <p>I use Visual Studio 2017 to open cmake projects. I have a debug application which uses MDd runtime library - CMAKE_CXX_FLAGS_DEBUG:<code>/MDd /Zi /Ob0 /Od /RTC1</code>. When I try to link to a release static library (MD runtime) I get the following errors:</p>
  <pre><code>error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.cpp.obj
  error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.cpp.obj
  </code></pre>
  <p>I can build a debug static library (MDd runtime library) and link to it but I wonder if there is any workaround for that issue ?</p>