SDL/SDL_image.h: No such file or directory

Knarf picture Knarf · Jul 27, 2011 · Viewed 57.4k times · Source

I'm trying to follow Lazy Foo's tutorials. But when I try to run one of his examples I get this compiler error:

error: SDL/SDL_image.h: No such file or directory

The compiler/linker is set up correctly, I'm using Code::Blocks on Windows XP.

However, the problem is simply that there are no SDL_image.h. I've checked in the folder that it supposedly should have been. I tried to download the SDL library again and checked again, still no SDL_image.h file. Where did the SDL_image.h file go?

The library I dowloaded was the 'SDL-devel-1.2.14-mingw32.tar.gz' under 'Development Libraries' for Win32 from this link: http://www.libsdl.org/download-1.2.php

Answer

Piotr Praszmo picture Piotr Praszmo · Jul 27, 2011

You need to install SDL_image separately. It's not shipped with SDL.