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.
It appears that libpng16-16.dll
has a dependency on zlib1.dll
for MinGW-w64 (32-bit). Try to include zlib into your dependnecies--include the DLL in the folder where the executable runs.