Search code examples
xcode

Xcode not finding classes in my build, but works in a co-worker build (we have same version)


I have a perplexing situation going on with Xcode.

My colleague and I have the same svn revision of our code.

When I open Xcode and try to build the build will succeed. However if click on any class, it will suddenly find errors that it can't find class types for objects I am using.

On my colleagues computer and with his build, Xcode runs it fine and does not encounter errors when he opens a class file.

The errors I get are: "Use of undeclared identifier" "Unknown type name"

Can you think of some issue, perhaps in the build settings, that might be causing my compiler issues when I inspect classes?


Solution

  • Under your build settings, in the search field, enter "header search path"

    you'll see the build settings short list the Header Search Paths section

    Double click on the value. Most probably, the search path is not relative.

    It may be /Users/userName/Desktop/yourProjectFolder

    Change it to "$(SRCROOT)/yourProjectFolder/" or "$(SRCROOT)/"

    If this is not the problem, post some screenshots of the errors.