title: Visual Studio 15 __imp___iob, __imp___pctype, __imp___mb_cur_max
body: <p>I am trying to use a library compiled with mingw in visual studio. However, I get the following linker errors:</p>
  <blockquote>
  <p>error LNK2001: unresolved external symbol __imp___iob</p>
  <p>error LNK2019: unresolved external symbol __imp___pctype referenced in function</p>
  <p>error LNK2019: unresolved external symbol __imp____mb_cur_max referenced in function</p>
  <p>error LNK2001: unresolved external symbol _fprintf</p>
  </blockquote>
  <p>I was able to fix the _fprintf error by linking against legacy_stdio_definitions.lib as per this post : <a href="https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2">unresolved external symbol __imp__fprintf and __imp____iob_func, SDL2</a>.</p>
  <p>However, I have no idea how to fix the other three unresolved externals. How can I fix this? The libraries work perfectly under Visual Studio 2013.</p>
  <p>Edit:</p>
  <p>Okay here is an update. I moved libmsvcrt.a from the mingw lib folder into Visual Studio, and I added that to the linker settings. Now it seems to work correctly.</p>