Cannot build release builds with Xcode/SDL :(

yoki808
Unregistered
 
Post: #1
Hi everyone!

I have made an application which uses SDL, SDL_mixer and SDL_image..
I have used the latest SDL-projecttemplates for Xcode (2.5)..

When i build the application using the Debug-build everything works like a charm, but when i change to Release-target I get lots of errors like this:

@executable_path/../Frameworks/SDL_mixer.framework/Versions/A/SDL_mixer expected to be defined in @executable_path/../Frameworks/SDL.framework/Versions/A/SDL

I am linking with all relevant frameworks and when i check the .app the files which the linker is complaining about is there allright.. what could this be? i have searched for this problem on various forums for about 5 hours now without finding anyone experiencing similar problems :/

cheers,

markus
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Is that message during linking, or when the application runs?

If it's during linking, that doesn't look like the whole error message... can you paste the detailed build log?
Quote this message in a reply
yoki808
Unregistered
 
Post: #3
the message is during the linkphase..

sorry, im to much of a xcode newbie to be able how to figure out how to copy more than one line from the builderror-list so i took screenshots of both the complete errorlist (which is just a bunch of SDL_image and SDL_mixer functions which the linker does not find at the @executable_path although the actual frameworks are in place inside the .app generated) and the setup of my project..

[Image: 8fo4kfd.png]
[Image: 7xxnn1k.png]

i tried to compile a completely other project, an open source doom2-clone (http://www.odamex.net) which also uses SDL.framework, SDL_image.framework and SDL_mixer.framework with the xcode-project included in their sourcerelease and ended up with the same linker errors Sad
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #4
Here's a couple things to try:
In the terminal, cd to the SDL.framework MacOS folder, and nm the sucker. I'd pipe it through a 'grep FillRect.'

LD can't find the symbols SDL_image/mixer references. Try making a project without them, and see if that links. If it does, try rebuilding image/mixer from source.

It's not magic, it's Ruby.
Quote this message in a reply
yoki808
Unregistered
 
Post: #5
i nm:ed the SDL.framework/SDL and SDL_mixer.framework/SDL_mixer inside the .APP and they contain all symbols LD claims as missing :S

I can make a releasebuild of projects not containing SDL_mixer and SDL_image and i can make debugbuilds of projects which contains those frameworks without any warnings whatsoever, but when going Release the linker go nuts. Can this have anything to do with the install_path which is used when building the SDL-frameworks?

The frameworks i am using now are the binary ones downloaded from http://www.libsdl.org, do I have to rebuild these from source in order to make them embeddable in my .APP?
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #6
hm... I don't think you're linking to sdl for some reason. Do you have zerolink on?

If so, turn it off. There's no reason to be using it; it just causes problems.

It's not magic, it's Ruby.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #7
that'll prevent him from making debug builds too Wink

I'm just guessing, but maybe the problem is that the SDL framework isn't installed, but the SDL_mixer framework is? It looks like there's an SDL_mixer framework in the 10.4u SDK which probably shouldn't be there, and no SDL framework to match.

Probably putting both in /Library/Frameworks would fix the issue, though it's not necessarily desirable.
Quote this message in a reply
yoki808
Unregistered
 
Post: #8
i have always installed my frameworks into /Library/Frameworks/ :/

I doubt there is anything wrong with the SDL.framework since I am actually able to build relasebuilds using only SDL.framework..

edit:
i checked the Framework-dir in /Developer/.. and it is only a softlink to /Library/Frameworks/

edit2:

rebuilt all frameworks from source, now everything works!! yiha!
thanks for all help!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL problem in Xcode deployment build grandall 6 3,899 Mar 29, 2006 11:12 AM
Last Post: grandall
  Notes on using latest builds of SDL aaronsullivan 13 7,057 Jan 26, 2005 11:20 AM
Last Post: Josh