Question about sdl

I am new and I use xcode, I have a question about sdl.
When I drag all the 38 header files, they appear and are on top of the one that says main.cpp and I then try to put preprocessor #include <sdl.h> but it says sdl.h not found. I am going nuts i have tried to find a solution for over two hours. Am about to smash my computer on the desk.
Am I maybe dragging it into the wrong spot? Is there a specific place to drag the header files? All help is highly appreciated

very confused, M
I have never used xCode, but you probably are not specifying a directory for the compiler to look.
pogrady, how can i specify one then? How can i specify a directory. thanks
Usually an IDE will have a default directory that it looks in for header files. It might be called include/ (I haven't used Xcode either.) Regardless of the name, if you find the directory in which your other header files are, you can put the SDL header files in there. I recommend making a sub directory include/SDL/ to stay organized, then in your source files you can add #include <SDL/SDL.h> .

It sounds like you might have put the SDL header files in the directory that your project source files are in, in which case the IDE would not know to look there, but you can still include them by using double quotes e.g. #include "SDL.h" .

If you want to add another directory besides "include" for the IDE to automatically look in, there is probably an option for that, but I can't help there.

Edit:
By the way, if you are looking for a good SDL resource I would check out http://lazyfoo.net/SDL_tutorials/index.php . It's geared toward game programming, but it's very informative on the basics non the less.

Edit 2:
I just realized that the site I linked to has a guide for setting up SDL for Xcode too ;] http://lazyfoo.net/SDL_tutorials/lesson01/mac/xcode/index.php .
Last edited on
monad, thank you soo sooo much!!!
Topic archived. No new replies allowed.