• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to make a program look for dylibs other than /usr/local/lib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: How to make a program look for dylibs other than /usr/local/lib?
      • From: "parag vibhute" <email@hidden>
References: 
 >Re: How to make a program look for dylibs other than /usr/local/lib? (From: "parag vibhute" <email@hidden>)
 >Re: How to make a program look for dylibs other than /usr/local/lib? (From: Alastair Houghton <email@hidden>)
 >Re: How to make a program look for dylibs other than /usr/local/lib? (From: "parag vibhute" <email@hidden>)

  • Prev by Date: Re: Query regarding dynamic library
  • Next by Date: How to exclude existing resource languages from a target
  • Previous by thread: Re: How to make a program look for dylibs other than /usr/local/lib?
  • Next by thread: Re: How to make a program look for dylibs other than /usr/local/lib?
  • Index(es):
    • Date
    • Thread