SDL problem - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: SDL problem (/thread-3284.html)
SDL problem - NSDuo - May 15, 2007 07:00 PM
It seems like everyone is having a problem like this, anyway...
I downloaded SDL and put the framework and template files where they belong. So I created a new SDL OpenGL app, changed all instances of "SDL.h" to "SDL/SDL.h", removed the nonworking SDL framework connection and replaced it with a working one. Now I'm getting 5 errors because of this one error I'm getting saying "error: SDL/SDL.h no such directory". I have absolutly no idea why its doing this.
SDL problem - Aressera - May 15, 2007 08:57 PM
try saying <SDL/SDL.h>. the "<" and ">" tell the compiler to search for that file. When you put it in qoutes, it's a literal path relative to your project. That's why its not finding it.
SDL problem - NSDuo - May 15, 2007 09:09 PM
I'll remember that in the future, but it didn't work...
SDL problem - maximile - May 16, 2007 01:21 AM
If you created an SDL project from the template and it doesn't build, maybe something went wrong with your SDL installation. Every time I've done it, you can just build it straight away with no complaints.
If you do want to use SDL from somewhere else, maybe you need to add it to your header search paths or framework search paths. Have a look in the build settings.
SDL problem - longjumper - May 16, 2007 09:44 PM
To reiterate what maximile said and to clarify exactly what he means, the compiler cannot find your SDL.h file because it doesn't know where to look. In your build settings for a project, you can specify where to find certain things such as header files, libraries and frameworks. AFAIK, regardless of what is entered in these settings, XCode will always search /System/Library/Frameworks, as it is where nearly all of the Apple supplied frameworks are. If the SDL.framework did not install to this location, you can drag it there and have it work. Or you can find where it was installed(Possibly /Library/Frameworks, as some 3rd party frameworks default there) and add that path to your build settings.
I am not familiar with SDL, but if you have built the framework properly it should be somewhere on your computer, and it's only a matter of telling the compiler where it is.
SDL problem - NSDuo - May 17, 2007 04:48 PM
Thanks for explaining it too me, it's found the file, but now I'm getting one last error: "Command /usr/bin/gcc-4.0 failed with exit code 1"