1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: 无法解析的外部符号 __imp__fprintf,函数 _ShowError 中引用了该符号
1>SDL2main.lib(SDL_windows_main.obj) : error LNK2019: 无法解析的外部符号 __imp____iob_func,函数 _ShowError 中引用了该符号
#pragma comment(lib, "legacy_stdio_definitions.lib")
#if _MSC_VER>=1900
#include "stdio.h"
_ACRTIMP_ALT FILE* __cdecl __acrt_iob_func(unsigned);
#ifdef __cplusplus
extern "C"
#endif
FILE * __cdecl __iob_func(unsigned i) {
return __acrt_iob_func(i);
}
#endif /* _MSC_VER>=1900 */
这篇博客主要讨论了在Windows环境下使用SDL2库时遇到的链接错误,如_LNK2019,涉及的函数包括fprintf和_iob_func。作者提供了针对这些问题的解决方案,包括引入legacy_stdio_definitions.lib库,并给出了自定义的_iob_func函数实现。
1万+

被折叠的 条评论
为什么被折叠?



