Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: SRCROOT not working even though paths seem to exist

I am receiving "file not found" errors when compiling in Xcode. My paths are specified relative to $SRCROOT and seem to be correctly identified. What's the problem?

like image 801
snibbe Avatar asked May 18 '11 23:05

snibbe


2 Answers

The problem was that my $SRCROOT path included spaces. All you need to do is quote SRCROOT like this: "$SRCROOT" and the problem is fixed.

like image 103
snibbe Avatar answered Oct 19 '22 03:10

snibbe


In my case, the reason was another. Try to check your path to headers. For example, I had a path in Headers Search Paths:

"$(SRCROOT)/Frameworks/KIF"

But my KIF folder was actually here:

"$(SRCROOT)/../Frameworks/KIF"

or by other words, one level up to my source root. That is why, when I changed SRCROOT to hardcoded path, my headers were found.

like image 35
Denis Kutlubaev Avatar answered Oct 19 '22 02:10

Denis Kutlubaev