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: Alastair Houghton <email@hidden>
- Date: Mon, 10 Dec 2007 15:43:16 +0000
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.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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