Cannot build release builds with Xcode/SDL :(
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
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
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?
If it's during linking, that doesn't look like the whole error message... can you paste the detailed build log?
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]](http://i8.tinypic.com/8fo4kfd.png)
![[Image: 7xxnn1k.png]](http://i13.tinypic.com/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
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]](http://i8.tinypic.com/8fo4kfd.png)
![[Image: 7xxnn1k.png]](http://i13.tinypic.com/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
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.
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.
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?
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?
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.
If so, turn it off. There's no reason to be using it; it just causes problems.
It's not magic, it's Ruby.
that'll prevent him from making debug builds too 
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.

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.
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!
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!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL problem in Xcode deployment build | grandall | 6 | 3,547 |
Mar 29, 2006 11:12 AM Last Post: grandall |
|
| Notes on using latest builds of SDL | aaronsullivan | 13 | 6,743 |
Jan 26, 2005 11:20 AM Last Post: Josh |
|

