• Advertisement
Sign in to follow this  

Xcode 4 on Lion and SDL 1.2.15

This topic is 2182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement