SDL error

Started by
3 comments, last by Undeadlnsanity 18 years, 4 months ago
in visual studio im having an error with it not finding #include <SDL/SDL.h> its there i checked it but its still saying no such file or directory. im using visual studio .net but the c++. can someone tell me why this is happening?
Advertisement
If you have SDL installed to the /include folder of VS.Net, then you will just need to use #include <SDL.h> instead.

If you have it in it's own folder, named SDL in there, you will need to check the compiler's directory settings to make sure it's looking at that path, to which then you will use the method above.

Right now I'm thinking the compiler does not know that it's there, thus giving you an error. So all you need to do is point the compiler's directory to that specific path, as well as the lib folder for linking and that should take care of it.
okay i went to Project->Chain of COmmands Properties then under the include directory i added SDL folder, and it still says that. i know for a fact its there.
So neither #include <SDL/SDL.h> and #include <SDL.h> work, even though the directories are there?

Are you working with a new project solution, or are you using an existing one? If you are working with an existing one, check their project properties for anything out of the normal for directories.

Worse case, just try doing a #include "C:\PathToFile\SDL.H" and make sure that works. If that does, then you will need to play with the settings of the directories more.
You need to include the directory that the SDL.h file is in, inside of your project linking properties. If the file is in say: C:\Program Files\Microsoft Visual Studio 2003 .NET\Vc7\Include then you would have to include that directory in your directory options.

If you're still stuck after doing this then give us a shout :-).

Good luck.

This topic is closed to new replies.

Advertisement