The file included in the error message is "libpng16-16.dll", I am using SDL2_Image version 2.0.4 with Visual C++ on Windows. No matter what I do, the message stays. i tried swapping out all libpng16-16.dll files with my version i got. I also tried including it into the system32 folder. Nothing works. I can initialize SDL2_Image for other formats, but as soon as i try to initialize it for png, it throws this message. all the time. Found few cases of this happening to others, but their way of fixing it doesn't work for me. at all. i am upset pls help. Here's my current code real quick:
#include "SDL.h"
#include "SDL_image.h"
int main(int argc, char* argv[])
{
SDL_Init(SDL_INIT_EVERYTHING);
IMG_Init(IMG_INIT_PNG);
SDL_Quit();
return 0;
}
Fixed it by using MSYS2 MINGW64 (and the SDL2 packages it provides) instead of Visual Studio.