title: Linking to the VC++ runtime statically while including static libraries that linked to it dynamically
body: <p>I'd like to (Windows, VS2019) statically link the VC++ runtime to my C++ application. The problem I'm having is that even if I set the /MT (Multi-threaded non-dll) option which should make the linker link statically to the runtime, it's not working. I get the error &quot;mismatch detected for runtime library&quot; for all those libraries which linked dynamically to the runtime. Basically' it's telling me that I can't link statically to the runtime if I have libraries that do not.</p>
  <p>I've seen questions like <a href="https://stackoverflow.com/questions/37398/how-do-i-make-a-fully-statically-linked-exe-with-visual-studio-express-2005">this one</a> where it says</p>
  <blockquote>
  <p>If you are using any other libraries you may need to tell the linker to ignore the dynamically linked CRT explicitly.</p>
  </blockquote>
  <p>Now I don't know how to do that or whether it'll work. My question is: is there a way to link my entire application statically to the VC++ runtime when the static libraries I have are linked dynamically to it?</p>
  <p>Thank you everyone in advance</p>