Embedded frameworks not working for everybody

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.

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.

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.

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.

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.