Re: More File Paths for dylibs
Re: More File Paths for dylibs
- Subject: Re: More File Paths for dylibs
- From: Dave <email@hidden>
- Date: Wed, 30 May 2007 21:28:14 +0100
Hi,
Thanks a lot!
In this case I have an Application that loads a plug-in that loads a
dylib. So, in this case the @executable_path is the Application and
@loader_path is the plug-in, correct?
If so, as you say:
"@loader_path/../Libs/libFPA.dylib"
Should be ok. Is the loader path set to the name of the .bundle file
or the real plug-in which is in <bundle>/contents/macos ?
I was assuming is was inside the bundle, if so then this is probably
what is wrong!
Thanks Again
All the Best
Dave
On 30 May 2007, at 19:05, Mike Blaguszewski wrote:
On May 30, 2007, at 1:37 PM, Dave wrote:
I've been search for info and playing around to try and get this
resolved. I'm not sure where to use the @executabe_path and
@loader_path or which one I need to use. Do I set it in the
install_name_tool utility? If so, which of the two paths do I use
given the scenario below.
@executable_path expands to the path of the application, and
@loader_path to the particular item (app, library or plugin) that's
the loading the shared library in question. Unless your plugins are
at a fixed location with respect to the application, you'll need to
use @loader_path, but be aware that it's not available prior to 10.4.
If you were building the lib in Xcode you'd use the "Installation
Directory" setting, but since it's a third party library lib you'll
have to use install_name_tool on it. (And note the warning in the
manpage, though I don't know if that's a problem in practice.)
What you're doing seems right to me, but make sure you link the
plugin against the library *after* using install_name_tool. Also,
you can check the settings using otool -D (shows install name) and
otool -L (shows linker dependencies).
--
Mike Blaguszewski / Cocoa Hacker / Ambrosia Software, Inc.
On 30 May 2007, at 19:05, Mike Blaguszewski wrote:
On May 30, 2007, at 1:37 PM, Dave wrote:
I've been search for info and playing around to try and get this
resolved. I'm not sure where to use the @executabe_path and
@loader_path or which one I need to use. Do I set it in the
install_name_tool utility? If so, which of the two paths do I use
given the scenario below.
@executable_path expands to the path of the application, and
@loader_path to the particular item (app, library or plugin) that's
the loading the shared library in question. Unless your plugins are
at a fixed location with respect to the application, you'll need to
use @loader_path, but be aware that it's not available prior to 10.4.
If you were building the lib in Xcode you'd use the "Installation
Directory" setting, but since it's a third party library lib you'll
have to use install_name_tool on it. (And note the warning in the
manpage, though I don't know if that's a problem in practice.)
What you're doing seems right to me, but make sure you link the
plugin against the library *after* using install_name_tool. Also,
you can check the settings using otool -D (shows install name) and
otool -L (shows linker dependencies).
--
Mike Blaguszewski / Cocoa Hacker / Ambrosia Software, Inc.
_______________________________________________
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