Re: How to make a program look for dylibs other than /usr/local/lib?
Re: How to make a program look for dylibs other than /usr/local/lib?
- Subject: Re: How to make a program look for dylibs other than /usr/local/lib?
- From: "parag vibhute" <email@hidden>
- Date: Mon, 10 Dec 2007 21:21:56 +0530
Is it possible to rebuild the library?? I only have headers files which are used by dynamic library and lipopbx.dylib file. I do not have source code of that dylib.
I tried to use install_name_tool but it did not work as man page says for this tool to work when the install names are larger the binary should be built with the ld(1) -header-pad_max_install_names option which I think is not used while building the dynamic library.
Thanks again for ur reply,
Palav.
On Dec 10, 2007 9:13 PM, Alastair Houghton <
email@hidden> wrote:
On 10 Dec 2007, at 15:35, parag vibhute wrote:
> Thanks Alastair for detailed information.
>
> From ur writeup, I came to know that dlopen is intended to get
> address of C functions only. But the dylib whose header file I have
> mentioned is not under my control. It is implemented by somebody
> else & has given install name of dylib as /usr/lib/libopbx.lib. So
> from ur writeup, I came to know that there is nothing I can do in my
> main program & only best way is to declare those functions as
> Virtual by dynamic library creator. Am I right?
No. You can either:
1. Build the dynamic library yourself, in which case you can specify a
different install name, or
2. Change the install name using install_name_tool.
Also, you can't declare the functions as virtual unless you are
rebuilding the library, and if you do that then your library won't be
compatible with the "normal" version of the library, so putting it in /
usr/local/lib would be dangerous.
Putting it in /usr/lib, BTW, is just plain wrong. /usr/lib is for
Apple, not for third-party software.
It sounds like you're building this dylib from source yourself anyway,
in which case you should be able to set the install name anyway.
--
There are many things in your life that will catch your eye but only a few will catch your heart....pursue those'.
_______________________________________________
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