For some reason Xcode is saying it cannot find a header file which is located in /usr/include
As a test, I just put the include at the top of a hello world program. I can compile it fine with clang in the terminal, but in Xcode it still says it cannot find the header.
I tried adding /usr/include to the “Header Search Paths” in build settings, but it is still not finding it.
I am not sure what to do here. It seems like Xcode should automatically be looking in this directory in the first place.
Typically in Xcode you build against a particular SDK. This gets passed as the
-isysrootparameter and is prefaced to system includes. So instead of looking in/usr/include, you would be looking in a path like:This would be for the 10.8 SDK under the default Xcode. You can find your current Xcode path using
xcode-select --print-path.