Hello everyone.
I just got my first macbook pro, and installed Xcode from mac app store.
I am trying to setup SDL 1.2.15 which was released a few weeks ago. The release explicit says it supports OSX Lion.
I just have a hard time getting it to setup.
I noticed that with 1.2.14, there were templates you could install with xcode. But those seems to be gone with sdl 1.2.15.
I have been scouting the net since its release for information on how other did it, but only found posts were people just said they got it to work and not how.
So I hope for some love from you guys, that someone of you have a template that works with the newest xcode and lion or if someone of you knows a guide how to set it up by creating an empty project.
best regards
Jakez
Xcode 4 on Lion and SDL 1.2.15
The old SDL project templates don't work with Xcode 4. The easiest way to go is to start with a Cocoa application project. For more detailed instructions on how to set up SDL with Xcode 4, read the following article:
Using SDL with Xcode 4
Using SDL with Xcode 4
Mark Szymczyk
Author of Mac Game Programming and Xcode Tools Sensei
http://www.meandmark.com
Author of Mac Game Programming and Xcode Tools Sensei
http://www.meandmark.com
It worked! Thanks a lot, much love.
Besides following the article, I had too change the include in the SDLMain.m from "SDL.h" to "SDL/SDL.h".
Is it your article? then maybe include a final screen shot of how the project looks like when you see the files and folders from xcode, thinks that would have cleared a bit of my confusion
properly just because my English isn't that well.
But thanks again!
best regards
Jakez
Besides following the article, I had too change the include in the SDLMain.m from "SDL.h" to "SDL/SDL.h".
Is it your article? then maybe include a final screen shot of how the project looks like when you see the files and folders from xcode, thinks that would have cleared a bit of my confusion

But thanks again!
best regards
Jakez
Does anyone know, why I have too add MyApp.app/Contents/resources/ everytime I try too load something like:
SDL_LoadBMP( "MyApp.app/Contents/Resources/Hello_world.bmp" );
I have too do it no matter what I load. sounds, images and even for .txt files when I use ifstream og ofstream.
Its quite a hazzle, and kinda shot in the foot for portability
SDL_LoadBMP( "MyApp.app/Contents/Resources/Hello_world.bmp" );
I have too do it no matter what I load. sounds, images and even for .txt files when I use ifstream og ofstream.
Its quite a hazzle, and kinda shot in the foot for portability
Change the setupWorkingDirectory: method in SDLMain.m so the working directory is the application bundle's Resources folder. You can find code to change the working directory in the following article:
SDL Tips for Mac OS X
Read the section Changing the Working Directory.
SDL Tips for Mac OS X
Read the section Changing the Working Directory.
Mark Szymczyk
Author of Mac Game Programming and Xcode Tools Sensei
http://www.meandmark.com
Author of Mac Game Programming and Xcode Tools Sensei
http://www.meandmark.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement