Home >Backend Development >C++ >Why Do I Get Unresolved External Symbols __imp__fprintf and __imp____iob_func in Visual Studio 2015 When Using SDL2?
Unresolved External Symbols: __imp__fprintf and __imp____iob_func in Visual Studio 2015
When compiling programs that use SDL2 in Visual Studio 2015, you may encounter unresolved external symbols __imp__fprintf and __imp____iob_func. This error indicates that the linker cannot resolve references to these symbols in the linked libraries.
Previously, Visual Studio defined standard I/O functions (stdin, stdout, stderr) using __iob_func() and its index. However, in Visual Studio 2015, the definitions changed, using __acrt_iob_func() instead. This change removed the direct reference to __iob_func(), leading to unresolved symbol errors when using libraries compiled with older versions of Visual Studio.
To solve this issue, you can either:
After making these changes, recompile your code. The unexplained external symbols should no longer appear.
The above is the detailed content of Why Do I Get Unresolved External Symbols __imp__fprintf and __imp____iob_func in Visual Studio 2015 When Using SDL2?. For more information, please follow other related articles on the PHP Chinese website!