SDL.h: no such directory found

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

I set up SDL on my compuer with Code Blocks. But There was an error that said: "fatal error: SDL.h: No such file or directory"

Here an image of the error: http://i.imgur.com/4fvBNFw.png

http://i.imgur.com/aPGmZT2.png

http://i.imgur.com/xkJLco5.png

http://imgur.com/aPGmZT2,xkJLco5,kEgaRqg#2

~GTE

Advertisement
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".

yeah i tried that

~GTE

Have you installed SDL? If so, how?

http://i.imgur.com/kEgaRqg.png


... Uhh, those should be lower case Ls, not pipes |... See GCC link options. Pipes are used to pipe output from programs elsewhere (to a file, another program, etc).

Um.... Did you put a. copy of the SDL.lib in the same folder as the exe file? I think you find it in the lib folder.

Guys thanks I fixed the issue

~GTE

Guys thanks I fixed the issue

Care to share, just so this thread isn't totally useless and other people coming across it in the future can hope to fix their problem too?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Here is my folder structure:

C:\SDL2\bin
include
lib

These folders came from "i686-w64-mingw32" not "x86_64"
Codeblocks setup:
Linker settings -> other linker options: -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer

Search directories - Compiler:
C:\SDL2\include\SDL2
C:\SDL2\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2
C:\SDL2\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2

Search directories -Linker:

C:\SDL2\lib
C:\SDL2\SDL2_image-2.0.0\i686-w64-mingw32\lib
C:\SDL2\SDL2_mixer-2.0.0\i686-w64-mingw32\lib

//main.cpp
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>

Should work perfectly fine.
I give up editing my post. It keeps changing characters for me... :(

This topic is closed to new replies.

Advertisement