• 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: Peter O'Gorman <email@hidden>
  • Date: Thu, 06 Dec 2007 00:08:21 -0600

Graham Reitz wrote:
> I have a C++ project that needs to load a third party dylib.  I removed
> the dylib from /usr/local/lib and placed it in a different directory.  I
> updated the linker paths to reflect this change .  When I run the
> program it is still looking for the dylib in /usr/local/lib.
>
> How do you tell it to look for the dylib in a different directory?
>
>  It still looks in /usr/local/lib even if I place the dylib in the same
> directory as the binary.

Look at the manpage for install_name_tool, also google for docs for
@executable_path, @loader_path and @rpath.

Even though you have moved the binary, its install_name remains as
/usr/local/lib/libfoo.dylib.

Peter
--
Peter O'Gorman
http://pogma.com
 _______________________________________________
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: Graham Reitz <email@hidden>
References: 
 >How to make a program look for dylibs other than /usr/local/lib? (From: Graham Reitz <email@hidden>)

  • Prev by Date: How to make a program look for dylibs other than /usr/local/lib?
  • Next by Date: Re: SDKs and framework paths
  • Previous by thread: 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