SDL.h: No such file in directory

This is driving me crazy.

Hello, I am attempting to draw a hexagon using CodeBlocks and SDL. I have tried countless times to include "SDL_draw.h", but no matter what I do, whenever I try to compile it complains "SDL.h: No such file in directory".

If I do not use SDL_draw.h and execute the project (which DOES have SDL), it all goes fine (by the way, this is what I'm working from: http://the-nd.com/develop/nD_Template_v0.50.zip ).

I have read many tutorials online that either do not work or I do not understand. I'm not very familiar with Codeblocks either. Could someone please explain it to me in the absolute bare basics?

Thankyou very much.
Try physically putting both files with ur headers and source code ?

g++ "whatever".cpp "whatever".h

also

please put all files in 1 folder, unless you created your library (.a) file and have a makefile.

If you have a makefile, please make sure that your PATH are set correctly.
...Uh... I'm not sure I understand. SDL_draw.h isn't just a solitary file. It comes with all sorts of crazy libraries and stuff which I don't know where to put.
export LD_LIBRARY_PATH=give ur library path
use: in between if u have multiple libs
export USER_INCLUDE="-Igive ur header files path"
use -I before each path
I'm sorry, but I do not understand what that means.
I don't know if this helps, but I followed these instructions: http://wiki.codeblocks.org/index.php?title=Using_SDL_with_Code::Blocks

With the package I downloaded, and still nothing.

Basically, what happens when I compile is the "SDL_draw.h" file is automatically opened, the line shown is the #include "SDL.h" from within "SDL_draw.h", and the complaint is that SDL.h is not in the directory.

However, in the main.cpp file, the first line of code is #include <SDL/SDL.h>, which does not cause problems.
Last edited on
Topic archived. No new replies allowed.