iDevGames Forums

Full Version: true newbie Q: my app can't find the .nib file (SDL)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I put SDL in the app like it says to in the 'structions and all I get is:

2006-01-17 22:01:18.762 HG 1.5 (X SDL)[469]
Unable to load nib file: main, exiting

If I don't enable the .nib (#define SDL_USE_NIB_FILE 1), everything's fine. The folks at SDL seem to thing their creation is baby-proof and it should just work.

If anybody has an idea why it won't find the *&%^# nib, can you give me a clue? I've tried sacrificing a toaster to my computer and even that didn't work.

Chris
did you also put the nib in your app?
The nib is in the app. Under 'resources'. I've tried renaming it, taking off the .nib, and countless other things that are lost in the fog of the last 8 hours.

I know it's a rediculous problem but I'm stuck.
Should be MainMenu.nib, in Contents/Resources

I've never used the SDL nib, though...
How do you control where it ends up after you compile?

I assume it can be anywhere before you compile, as long as there is a reference to it under 'resources'.
SDL screws with the currrent working directory - unless in your code you've changed the CWD to be "x.app/Content/Resources" prior to trying to open the .nib, the CWD will be the directy which contains "x.app" - try moving the .nib there (just a suggestion, as I've never tried using .nibs with SDL.)

N.b. anything in the resources tab in Xcode is copied into "x.app/Content/Resources"
I remade the project and copied everything in and it just started working.

My coworker says he's seen this happen before. Without word-of-mouth I could have screwed around with this thing for ages.

Thanks folks
Reference URL's