Xcode: SRCROOT not working, although paths seem to exist

When compiling in Xcode, I get "file not found" errors. My paths are relative to $ SRCROOT and seem correctly identified. What is the problem?

+4
source share
2 answers

The problem was that my $ SRCROOT path included spaces. All you have to do is quote SRCROOT as follows: "$ SRCROOT" and the problem has been fixed.

+10
source

In my case, the reason was different. Try checking your heading path. For example, I had a path in the header search path:

"$ (SRCROOT) / Frameworks / CIF"

But my KIF folder was here:

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

or in other words, one level down to my original root. That is why when I changed SRCROOT to the hard path, my headers were found.

+1
source

All Articles