• 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
Help with target that uses another target's output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with target that uses another target's output


  • Subject: Help with target that uses another target's output
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 30 Jun 2011 16:39:11 -0700

It’s always been fairly painful to set up a target that uses a library built by another target (either in the same project or another one). The procedure for setting this up seems to have changed in Xcode 4, but I can’t find anything in the docs that describes it. And I’m having a hard time with a project that seems to build for other people but won’t for me, because of dependent library problems.

As an example, say I have 
- A.xcodeproj, with a target TargetA that builds libA.dylib (or libA.a).
- B.xcodeproj, with a target TargetB that links against libA.

In Xcode 3 I would have dragged A.xcodeproj into B’s source list; opened the editor for target B; clicked the + in the list of target dependencies, and chosen TargetA from the pop-up. This would set up TargetB to link in libA (including finding the right debug/release variant based on the current configuration), add the right library search paths, and force TargetA to rebuild before building TargetB.

How do I set this up in Xcode 4?

I ask because I’ve spent all day struggling with a workspace checked out from github [1], which builds fine for other people but generated all sorts of build errors for me. After painfully fixing the errors (all of which stemmed from library or framework search paths not being set up), I finally figured out that the difference between my Xcode and other people’s is the global preference for where build files go. (Prefs > Locations > Derived Data > Advanced.) If it’s set to the default, the derived-data location, the project builds; but mine is set to “locations specified by targets” (and always has been, ever since the ProjectBuilder days.)

Surely there has to be a way to set up the library dependencies that doesn’t break when someone changes a pref. :/

—Jens

[1] https://github.com/couchbaselabs/iOS-Couchbase
 _______________________________________________
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

  • Prev by Date: Re: Xcode 4 DerivedData folder and Framework Search Paths
  • Previous by thread: Re: Xcode inserting keys into info.plist
  • Index(es):
    • Date
    • Thread