I'm following the LazyFoo's SDL Tutorial with C (not CPP) and I'm stuck at the part where I switch from SDL_LoadBMP() to IMG_Load(). The function
SDL_Surface *load_image(char *filename) {
SDL_Surface* loadedImage = NULL;
SDL_Surface* optimizedImage = NULL;
loadedImage = SDL_LoadBMP(filename);
if(loadedImage != NULL) {
optimizedImage = SDL_DisplayFormat( loadedImage );
SDL_FreeSurface(loadedImage);
}
return optimizedImage;
}
Works just fine with
background = load_image("background.bmp");
but if I change
loadedImage = SDL_ImageBMP(filename);
it to
loadedImage = IMG_Load(filename);
and build/run it triggers the 0xc000007b error. I'm pretty sure I installed the SDL_image.h library properly cause I followed the steps carefuly. So my question is: what's wrong? From google I've come only to: something with .dll's but - what? I'm using Visual Studio 2010, but it happens with Code::Blocks as well (but there it just won't compile)