Re: dylib in non-standard location
Re: dylib in non-standard location
- Subject: Re: dylib in non-standard location
- From: "Peter O'Gorman" <email@hidden>
- Date: Fri, 26 Aug 2005 21:29:24 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nick Zitzmann wrote:
|
| On Aug 25, 2005, at 2:03 PM, Stefan Werner wrote:
|
|> This is what I appended to my custom linker settings:
|> -dylib_file /usr/local/lib/thelib.dylib:@executable_path/../
|> Frameworks/thelib.dylib
|
| 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.
Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iQCVAwUBQw8LJLiDAg3OZTLPAQJ2pgP/fVwrEKL48dAsMTaA0XeNJGaqyhOdNNhf
fwPbN3SmpeFtPA0gYt/lQwIeE3U4rYIA9hNaJLoFnJtD5PwrI44M9yWIglYj9uCj
yiQIIaAFgFzQQXLm4Pfyl9s0M9Nnfzi9CzH91i3DlrUbYnqbXXwBNo5HD2OVV2KS
1yNOjTJPfTg=
=yleN
-----END PGP SIGNATURE-----
_______________________________________________
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