Greg
Greg

Reputation: 34798

what would correct "User Header Search Path" be for this scenario (use of 3rd party library)

What would correct "User Header Search Path" be for this scenario (use of 3rd party library):

Notes:

Query Points - would be good if in the answer you could clarify the following items (which I'm a bit confused about)

  1. I see usage of $(BUILT_PRODUCTS_DIR) a lot. What does $(BUILT_PRODUCTS_DIR) actually resolve to? i.e. which directory
  2. do I need to use "$(BUILT_PRODUCTS_DIR)” as a starting point and then use multiple "../" entries to back out to a subdirectory above my app?
  3. I was assuming I should probably set a search path to somewhere high up in the library and then enable "Always Search User Paths"...would this be a good way to go?
  4. I have read using "User Header Search Path" currently may be better than using "Header Search Paths" as the former is currently ensuring code completion works. Is this ok / are there any negatives to using "User Header Search Path"?
  5. Is there a quick way to check in XCode that I've got the right search path in place? A way to tell it's picking up the header files I expect.
  6. Of course the main question is - What would correct "User Header Search Path" be for my scenario.

thanks

Upvotes: 0

Views: 1990

Answers (2)

Robert Altman
Robert Altman

Reputation: 5505

For Xcode 4.x, you can check the value of $(BUILT_PRODUCTS_DIR) easily by adding a custom build phase and having it add the environments to the build log.

  1. Go to "Target", and "Build Phases";
  2. Down at the lower right, click "Add Build Phase";
  3. Select "Add Run Script"; the script itself is empty, so it won't actually do anything;
  4. Make sure the "Show environment variable in build log" option is checked;
  5. Build the project

Now, when you check the build log, the environment variables will all be there (if you expand the build log stage's detail).

Upvotes: 1

Greg
Greg

Reputation: 34798

After noting that the build process directories are different now in XCode 4, and with help from the three20 doco at http://three20.info/article/2011-03-10-Xcode4-Support I have noted that what has worked is as follows. Hence I assume this approach would work for other libraries.

"$(BUILT_PRODUCTS_DIR)/../three20"
"$(BUILT_PRODUCTS_DIR)/../../three20"

Feel free to comment / supply a better answer if there is one.

Upvotes: 0

Related Questions