SDL_Image IMG_Load在png上失败,并带有:“无法加载libpng16-16.dll:"; [英] SDL_Image IMG_Load fails on png with: "Failed loading libpng16-16.dll:"

查看:433
本文介绍了SDL_Image IMG_Load在png上失败,并带有:“无法加载libpng16-16.dll:";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试使用SDL_Image的IMG_Load函数加载PNG时,都会出现错误Failed loading libpng16-16.dll:.我在正确的路径中具有所有正确的dll,并且可以使用SDL_Image的其他部分,但是由于某些原因,它无法加载libpng dll.我怎样才能解决这个问题?感谢您的帮助.

Whenever I try to load a PNG using SDL_Image's IMG_Load function it gives the error Failed loading libpng16-16.dll:. I have all the right dll's in the right path and I can use other parts of SDL_Image, but for some reason it can't load the libpng dll. How can I fix this? Any help is appreciated.

推荐答案

请参阅我的文章"

如果要从Visual Studio运行,请确保映像与main.cpp文件位于同一文件夹中;否则,如果您是直接从可执行文件运行,则映像应与可执行文件位于同一文件夹中.

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.

Needless to say, what I wrote about the image here goes for the DLLs as well.

这篇关于SDL_Image IMG_Load在png上失败,并带有:“无法加载libpng16-16.dll:";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆