Greg
Greg

Reputation: 34798

what's wrong with this approach re referencing another project in Xcode 4?

I'm trying to reference another Xcode4 project within Xcode4 but having troubles - what's I'm currently doing is as follows:

Any suggestions? What is the minimum number of places I need to touch/adjust in XCode4 project configuration such that I can start using clases from project B in project A, and it will all compile?

Upvotes: 0

Views: 463

Answers (1)

drekka
drekka

Reputation: 21883

If I'm reading this correctly I had the same issue the other night. Except that I was dealing with two targets, one that built a static library and the other that ran an app to executes tests on the static lib. Here's what I did

  • Target A builds a static lib.
  • Target B runs a unit testing suite for testing target A's static lib.

In target B's settings:

  1. Add Target A as a dependency. This ensures that it is built first. (I think :) )
  2. Add the static library (libA.a) from Target A to Target B's Link Binary With Libraries list along with any frameworks the lib needs.

The second item is the important one. Adding a dependency (as I understand it) doesn't automatically include any of Target A's output to Target B's linking phase.

Upvotes: 2

Related Questions