• 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
How to add a library w/o resolving symlinks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to add a library w/o resolving symlinks?


  • Subject: How to add a library w/o resolving symlinks?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 03 Dec 2012 09:34:49 -0800

This has annoyed me for years; am I doing this the wrong way?

When I add a dylib to a project, I usually select the unversioned file (e.g. “libfoo.dylib” instead of “libfoo.2.dylib”) because I want Xcode to link with the current version of the library, not a fixed version number. However, since that file is really a symlink to the most recent versioned file, Xcode (or NSOpenPanel) resolves the symlink and actually records the versioned path (“libfoo.2.dylib”) instead.

This isn’t usually much of a problem with system libraries in /usr/lib, but it gets annoying when I use libraries installed via Homebrew. For instance, I just had to deal with a project that broke after I ran ‘brew update', because it was linking against a specific older version of ICU (/usr/local/lib/Cellar/icu4c/41.1/lib/libicuuc.dylib) that was no longer installed, even though I wanted to link against the regular /usr/local/lib/libicuuc.dylib.

As far as I can tell, the only way to get the project to link against the unversioned libraries (i.e. the symlinks) is to hand-edit the pbxproj file in a text editor and fix the paths. Ick. Is there a better way?

—Jens
 _______________________________________________
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 add a library w/o resolving symlinks?
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: installing into /Library
  • Next by Date: Re: installing into /Library
  • Previous by thread: Re: installing into /Library
  • Next by thread: Re: How to add a library w/o resolving symlinks?
  • Index(es):
    • Date
    • Thread