Installing SDL for Xcode

Apprentice
Posts: 6
Joined: 2007.03
Post: #1
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
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #2
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.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Apprentice
Posts: 6
Joined: 2007.03
Post: #3
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
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #4
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.
Quote this message in a reply
Apprentice
Posts: 6
Joined: 2007.03
Post: #5
THANKS! I hope the sun shines on you all day
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #6
Hehe, no problem Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Installing and Using SDL DudetheCreator 3 2,890 May 22, 2005 08:42 AM
Last Post: DudetheCreator
  Installing SDL AndyWanKenobi 1 2,550 Dec 12, 2002 03:41 PM
Last Post: OneSadCookie