SDL.h: no such directory found

Started by
9 comments, last by Sik_the_hedgehog 9 years, 10 months ago

Quickfix:
#include "SDL/SDL.h"

Double check your directories; you've a search directory, "C:\Users\sarmeanu\DOCS\SDL\include\", but SDL.h is located at "C:\Users\sarmeanu\DOCS\SDL\include\SDL\SDL.h".

Note that it's SDL2/SDL.h in the case of SDL 2.0 (saying this in case somebody else looks at that post).

And yeah, that seems to cause trouble a lot of time. The documentation insists that one should use "SDL.h", but I have tried that in the past and the compiler becomes unable to find the header. In the end I use <SDL2/SDL.h> and it works just fine. I think the issue is that the documentation assumes you're using pkg-config (which will add the SDL headers directory to the include list).

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

This topic is closed to new replies.

Advertisement