每当我尝试使用SDL_
Image的IMG_Load函数加载PNG时,它会给出错误加载libpng16-16.dll:失败.我在正确的路径中有所有正确的dll,我可以使用SDL_Image的其他部分,但由于某种原因,它无法加载libpng dll.我怎样才能解决这个问题?任何帮助表示赞赏.
看我的文章“
SDL2: Loading Images with SDL_image”:
If you’re going to run from Visual Studio,make sure the image is in the same folder as your main.cpp file; otherwise if you’re running straight from the executable,the image should be in the same folder with it.
不用说,我在这里写的关于图像的内容也适用于DLL.