Installing SDL for Xcode
hi like others I've had problems installing sdl in mac osx, but mine might be even more simple!
I downloaded the dev and runtime libraries,
installed by moving framework into library/frameworks
moved templates into Developer Tools/Project Templates/Appllcation
then I tried to build it and the first error (of 38) is
#include <stdlib.h>
#if defined(_MSC_VER)
#include "SDL.h"
#else
<ERROR>#include "SDL/SDL.h"
#endif
<ERROR>SDL_Surface *screen;
etc etc
have I done something really silly here?
also, in the project overview window, SDL.framework comes up in red, which suggests from the start there is something wrong.
I'd love to fix this!
thanks very much
henry
I downloaded the dev and runtime libraries,
installed by moving framework into library/frameworks
moved templates into Developer Tools/Project Templates/Appllcation
then I tried to build it and the first error (of 38) is
#include <stdlib.h>
#if defined(_MSC_VER)
#include "SDL.h"
#else
<ERROR>#include "SDL/SDL.h"
#endif
<ERROR>SDL_Surface *screen;
etc etc
have I done something really silly here?
also, in the project overview window, SDL.framework comes up in red, which suggests from the start there is something wrong.
I'd love to fix this!
thanks very much
henry
If SDL.framework appears in red in the project, that means Xcode can't find the framework. Where did you install the SDL framework?
/Library/Frameworks
or
~/Library/Frameworks (where ~ is your username)
It should be in /Library/Frameworks.
I wrote an article on SDL and OpenGL that includes instructions on setting up SDL in Xcode. It might help you out.
/Library/Frameworks
or
~/Library/Frameworks (where ~ is your username)
It should be in /Library/Frameworks.
I wrote an article on SDL and OpenGL that includes instructions on setting up SDL in Xcode. It might help you out.
hi,,
yes I can't seem to stop the SDL.framework being in red!
I moved it to /library/frameworks
and also created in ~/libary/ the folder 'frameworks' (which didn't exist)
and moved the SDL.framework into that folder
how do I know if it needs to be there, or somewhere else?
or, is there some other reason why #include "SDL/SDL.h" would not work?
thanks
henry
yes I can't seem to stop the SDL.framework being in red!
I moved it to /library/frameworks
and also created in ~/libary/ the folder 'frameworks' (which didn't exist)
and moved the SDL.framework into that folder
how do I know if it needs to be there, or somewhere else?
or, is there some other reason why #include "SDL/SDL.h" would not work?
thanks
henry
ok, delete the reference of the framework in your project (click on it and press delete). The go project --> add to project. Then locate your way to the SDL framework, then click add. Then try building again.
THANKS! I hope the sun shines on you all day

