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.
- I tried installing
vcredist 2012(I don't have VS 2012). I thought it should install the old crt libraries which have_iob_funcdefinitions that I can link against. But I can't find wherevcredist 2012was installed on my Windows 10. I searched everywhere and the only crt files I found areucrtinWindwos Kits\10. Where doesvcredist 2012put the libraries? - Can I even solve this problem using crt libraries from
vcredist 2012which should have crt libs with defintion for_iob_func? - 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?