iDevGames Forums
Embedded frameworks not working for everybody - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: Embedded frameworks not working for everybody (/thread-4960.html)



Embedded frameworks not working for everybody - akb825 - Oct 1, 2005 10:50 AM

I'm making a game right now, and I embed a version of OpenAL with my code. I followed Apple's embedding frameworks document and did the following: I compiled the OpenAL framework having the installation path being "@executable_path/../Frameworks", I added the new copy files build rule to my game, and included the framework in my project. The framework is embedded in the game as expected, and it works as expected for most people so far. Unfortunately, 2 people so far have tried running it and it looks in the Frameworks folder in my home library. The funny thing is, I don't even have a Frameworks folder in my home library. I'm compiling with GCC 4.0 under Tiger, and these 2 people are using Mac OS X 10.3.9, but other people running 10.3.9 didn't have any problems. Any idea on what the problem is and how I can fix it? The discussion is here.


Embedded frameworks not working for everybody - OneSadCookie - Oct 1, 2005 03:17 PM

You need to either build the framework with the appropriate install_name, or build your executable with -headerpad_max_install_names and fix it up afterwards with install_name_tool.

otool -L will tell you where your app is actually going to search for the libraries & framworks.

OpenAL is preinstalled on 10.4, so naturally people there will have no problems. I believe the 10.3.x'ers who it's working for are simply red herrings -- people who've already installed Creative's OpenAL, for example.


Embedded frameworks not working for everybody - akb825 - Oct 1, 2005 03:28 PM

I would prefer to just build the framework with the proper install_name. Now, how do I do that? Rasp (I'm using XCode, BTW, and I'm not too familiar with the command line developer tools)

I need to go to my parent's house for today and tomorrow, so I'll be able to test it on their iMac G5 with 10.3.9 to see if it crashes on their computer, since OpenAL isn't installed.


Embedded frameworks not working for everybody - OneSadCookie - Oct 1, 2005 03:42 PM

Add -install_name @executable_path/../Frameworks to the other linker flags for OpenAL.

Make sure then that you link to your own OpenAL framework, not the system's.


Embedded frameworks not working for everybody - BinarySpike - Oct 1, 2005 03:43 PM

OSC Wrote:OpenAL is preinstalled on 10.4, so naturally people there will have no problems. I believe the 10.3.x'ers who it's working for are simply red herrings -- people who've already installed Creative's OpenAL, for example.

My 10.3.9 is brand new. Do I need to install OpenAL for some reason?
I really don't want to have to put alot of developer stuff on that computer because it's not mine and it doesn't have nearly as much space as this one.


Embedded frameworks not working for everybody - akb825 - Oct 1, 2005 05:10 PM

BinarySpike Wrote:My 10.3.9 is brand new. Do I need to install OpenAL for some reason?
I really don't want to have to put alot of developer stuff on that computer because it's not mine and it doesn't have nearly as much space as this one.
No, it's just that I didn't know to put the install_name in for the framework, so it only worked on people's computers where they installed OpenAL beforehand.

Thanks, OSC. I'll try it out once I get back on campus tomorrow.


Embedded frameworks not working for everybody - akb825 - Oct 3, 2005 12:10 AM

OneSadCookie Wrote:Add -install_name @executable_path/../Frameworks to the other linker flags for OpenAL.

Make sure then that you link to your own OpenAL framework, not the system's.
Well, I tried that, and it still didn't work... Any other suggestions with what to do with the framework and/or can you tell me how to do the thing you told me to do with the final application?

Edit: Well, I figured out how to use otool and install_name_tool, but any suggestions on how to change the framework so it can actually work so I don't have to do the same thing all the time? Until then, I'll just use a shell script.


Embedded frameworks not working for everybody - Fenris - Oct 24, 2005 08:53 AM

Check out your Copy Files build phase - the path box should be empty - not contain the framework. This bit me pretty hard today.


Embedded frameworks not working for everybody - akb825 - Oct 24, 2005 09:26 AM

Alas, I didn't include the framework.