Re: What's the magic in 'Installation Directory' (INSTALL_PATH)
Re: What's the magic in 'Installation Directory' (INSTALL_PATH)
- Subject: Re: What's the magic in 'Installation Directory' (INSTALL_PATH)
- From: Jeff Johnson <email@hidden>
- Date: Sun, 2 Dec 2007 10:41:25 -0600
On Dec 2, 2007, at 10:05 AM, Steve Checkoway wrote:
On Dec 2, 2007, at 7:12 AM, Jerry Krinock wrote:
When I am building a framework that is going to ship inside the
package of an application, in the framework's Target, I need to
set 'Installation Directory' (INSTALL_PATH) to
'@executable_path/../Frameworks'. This is so that the
^application^ can find ^it^.
So, I'm telling the framework to say "Come find me here". I don't
understand how this can work. How can the application get this
message from the framework saying where to find the framework
before it has found the framework?
It would make much more sense if I would have to set something in
the ^application^ to say "Look for that framework over there".
How does this magic work?
I'm no expert, but if I had to take a guess, I'd say that the
linker (the one linking your application) looks at the install name
of the framework that is being linked to and writes the install
name into the application. When you use @executable_path, that gets
written into the application and it knows where to find the framework.
Someone can correct me if that is incorrect.
--
Steve Checkoway
Steve is correct. I explain how this works in a little more detail
at <http://lapcatsoftware.com/blog/2007/08/11/embedding-frameworks-in-
loadable-bundles/>. I recommend checking out the man page for
"otool" and using otool to examine some apps and frameworks.
-Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden