Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why can't Xcode find this header file?

Hi I'm getting an xcode "no such file or directory" for:

#import "Three20Core.h"

I also note when I'm typing in the #import statement it recognises, and helps autocomplete, the "Three20Core.h" file, however when I compile I get the error?

This is the main library file header for the Three20 library (from Facebook). So I've got the three20 directory at the same level as my app directory. In the Xcode application target build settings:

  1. Header Search Paths - "$(BUILT_PRODUCTS_DIR)/../../../three20" and recursive, and
  2. User Header Search Paths - same as above.

Any fault finding advice?

like image 543
Greg Avatar asked Apr 12 '11 10:04

Greg


2 Answers

See an expanded version of this answer here: Xcode 4 Archive Version Unspecified

I've found many issues with Xcode 4 when it comes to complex project structures.

  1. Create a group in your project called "Indexing"
  2. Drag the header files to this group
  3. When asked to select a target uncheck ALL targets

This has solved most of my Xcode 4 issues.

Related questions:

like image 64
Richard Stelling Avatar answered Oct 01 '22 02:10

Richard Stelling


Issue was my lack of understanding of the change in the Xcode 4 build system over Xcode 3. All that I had to do was set header paths to:

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

per http://three20.info/article/2011-03-10-Xcode4-Support

like image 34
Greg Avatar answered Oct 01 '22 03:10

Greg