Can I use CRT libs from pre-2015 vcredist to build in newer Visual Studio?

44 Views Asked by At

I tried to build a C++ project that uses third-party libs with VS 2022. I got unresolved external symbol printf error. After trying linking with legacy_stdio_definitions.lib I got __iob_func: identifier not found error. According to this post, the libs I'm using were built with prior VS2015 CRT libraries. Since I don't have the source code I cannot recompile them.

  1. I tried installing vcredist 2012 (I don't have VS 2012). I thought it should install the old crt libraries which have _iob_func definitions that I can link against. But I can't find where vcredist 2012 was installed on my Windows 10. I searched everywhere and the only crt files I found are ucrt in Windwos Kits\10. Where does vcredist 2012 put the libraries?
  2. Can I even solve this problem using crt libraries from vcredist 2012 which should have crt libs with defintion for _iob_func?
  3. According to this The definitions of all printf and scanf functions have been built into <stdio.h>. Does this mean that because they are inline, there are no definitions at all, because the compiler just replaced the function call with the actual code, and nothing is exported, and that's why the linker can't find any definition for _iob_func?
0

There are 0 best solutions below