Re: dylib in non-standard location
Re: dylib in non-standard location
- Subject: Re: dylib in non-standard location
- From: Stefan Werner <email@hidden>
- Date: Sat, 27 Aug 2005 16:18:15 +0200
On Aug 26, 2005, at 2:29 PM, Peter O'Gorman wrote:
| Try using the install_name_tool program... I've never heard of the -
| dylib_file option before, but install_name_tool ought to work.
It also
| helps to pass the -headerpad_max_install_names option to the linker
| when building the dylib, if that's possible.
- -dylib_file is not correct in this case, it is for linking
uninstalled
libraries. For example liba.dylib depends on libb.dylib. libb.dylib
is not
installed in /usr/local/lib, but it has an install_name of
/usr/local/lib/libb.dylib. Similarly, liba is not yet installed.
Now I want
to make a libc that links to liba, I would do:
gcc -o libc.dylib -dynamiclib -install_name /usr/local/lib/libc.dylib
<objects> -L. -la -dylib_file /usr/local/lib/libb.dylib:./libb.dylib
Read the ld man page for a better explination. Yes,
install_name_tool is
what is needed in this case.
Thanks, install_name_tool works fine. I was a bit puzzled with all
that, this is the first time I see that I need to explicitly tell the
linker the installation path of a dynamic library. Is this specific
to the Mach-O format?
Stefan
_______________________________________________
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