使用 SDL2.0.3 加载 PNG 图像

Load PNG Images using SDL2.0.3

每当我尝试使用 SDL2.0.3 和 visual studio 2012 加载 PNG 图像时,我总是收到此错误。

The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll error

我已将 slib1.dll 文件放在与我的项目的 .exe 文件相同的目录中。我还将它添加到我的 windows 目录中的 System32 文件夹中。 我想了解这个错误是什么意思,以及如何处理它。提前致谢! P.S。 .pmb 图像工作正常

进一步挖掘后,我发现我的 windows system32 目录中的 slib1.dll 的版本与我复制到我的项目文件夹中的版本不同。将项目中的那个替换为 system32 文件夹中的同一个后,它工作正常。 我发现 this thread 在类似的问题上确实很有帮助,它指出: "Procedure entry points errors usually mean: you compiled your project against a library version x, and when running the program, it uses a library.dll version y, and version y does not define library::Destroy()"