Unraveling the Mystery of Unresolved External Symbols: __imp__fprintf and __imp____iob_func
Your compilation errors indicate that the linker cannot find the necessary definitions for two external symbols: __imp__fprintf and __imp____iob_func. These symbols are related to input and output operations.
In Visual Studio 2015, changes to the definition of stdin, stderr, and stdout have introduced this error. Previously defined as __iob_func(), these symbols are now defined differently. This inconsistency leads to linking problems with libraries compiled using older versions of Visual Studio.
To resolve this issue, you can define __iob_func() as an array containing {stdin,stdout,*stderr} within your code. Additionally, adding legacy_stdio_definitions.lib to your linker options can address the errors related to stdio functions, such as sprintf().
By following these steps, you can resolve the unresolved external symbol errors and successfully compile your SDL2 program.
The above is the detailed content of Why Do I Get Unresolved External Symbols __imp__fprintf and __imp____iob_func in Visual Studio 2015?. For more information, please follow other related articles on the PHP Chinese website!