在编译旧版本 VS 带 SDL 的项目时经常遇到这个问题,两个错误分开解决。

无法解析的外部符号 __imp____iob_func

VS2015 开始这个方法名被更新了,手工定义一下即可。

FILE _iob[] = { *stdin, *stdout, *stderr };
extern"C" FILE * __cdecl __iob_func(void)
{
	return _iob;
}

无法解析的外部符号 __imp__fprintf

微软自己出了一个库文件专门解决这个问题,我们只需要在链接器的附加依赖项中添加 legacy_stdio_definitions.lib 依赖即可解决。

相关文章:

  • 2021-07-27
  • 2021-08-11
  • 2022-01-03
  • 2021-10-19
  • 2021-04-27
  • 2021-05-26
  • 2021-11-30
  • 2021-05-31
猜你喜欢
  • 2021-04-21
  • 2022-12-23
  • 2021-05-31
  • 2021-07-27
  • 2022-01-02
  • 2022-01-10
相关资源
相似解决方案