Yea, I know you guys get a TON of these threads but I’ve read so many things online and still NEVER get it to work.
Here’s what I did:
- Downloaded the SDL-1.2.14.dmg under Mac OS X under Runtime Libraries
- Downloaded the SDL-devel-1.2.14-extras.dmg under Mac OS X under Development Libraries
These are the only 2 files I downloaded from the SDL website.
After downloaded these, I did the following:
- Mount the SDL-1.2.14.dmg
- Open it
- Copy SDL.framework into Libraries/Frameworks/ so the path to that folder will then become Libraries/Frameworks/SDL.framework
- Mount the SDL-devel-1.2.14-extras.dmg
- Open it
- Navigate via XcodeTemplates/TemplatesForXcodeSnowLeopard/ and find 3 folders: SDL Application, SDL Cocoa Application & SDL OpenGL Application
- Navigate to Libraries/Application Support/, create folder “Development”
- Navigate to Libraries/Application Support/Development/, create folder “Shared”
- Navigate to Libraries/Application Support/Development/Shared/, create folder “Xcode”
- Navigate to Libraries/Application Support/Development/Shared/Xcode/, create folder “Project Templates”
- Navigate to Libraries/Application Support/Development/Shared/Xcode/Project Templates/, create folder “Application”
- Navigate to Libraries/Application Support/Development/Shared/Xcode/Project Templates/Application/
- Copy the 3 SDL Application folders we found at step 6 to this location
Approach 1:
After this, I fired up Xcode, created a new project and just choose the SDL Application(I later tried the SDL Cocoa Application aswell). When trying to build and run the test-thing, it game me a compiler error:
error: There is no SDK with the name or path ‘macosx10.4’
After having gotten that error message, I tried editing the Info.plist and edit it to use 10.6 instead(since I’m on a Mac OS X 10.6.6). Still won’t work.
Approach 2:
I also tried create a regular C++ project and #include <SDL/SDL.h>, compiling this works great so at least the SDK version is correct aswell as it finding the SDL file to include! But when I add things like SDL_Init and SDL_Quit to just test the SDL-part of it, it gives me the famous:
“_main”, referenced from:
start in crt1.10.6.o
(maybe you meant: SDL_main(int, char* const*))
After having searched the forums a bit I read that I also need to #include <SDL/SDL_main.h>. I did that and it still gives me the error.
I also copied over the SDLMain.h from SDL-devel-1.2.14-extras.dmg/XCodeTemplates/TemplatesForXcodeSnowLeopard/SDL Application/SDLMain.h to the SDL.framework folder in Libraries/Frameworks as I’ve also read on the forums but it doesn’t work either.
ANY idea as to what could be the problem here??
Do I need to download the source aswell because I haven’t done that?
Really need SDL for this project so I would appreciate all the help I can get!
Cheers