• 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: dylib in non-standard location
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: dylib in non-standard location
      • From: Chris Ridd <email@hidden>
References: 
 >dylib in non-standard location (From: Stefan Werner <email@hidden>)
 >Re: dylib in non-standard location (From: Nick Zitzmann <email@hidden>)
 >Re: dylib in non-standard location (From: "Peter O'Gorman" <email@hidden>)

  • Prev by Date: Re: Releasing variables
  • Next by Date: Linking with dynamic libraries in /usr/lib?
  • Previous by thread: Re: dylib in non-standard location
  • Next by thread: Re: dylib in non-standard location
  • Index(es):
    • Date
    • Thread