Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Not finding yajl/yajl_parse.h BUT IT'S THERE !

My solution to the failed yajl header include was the following:

Instead of adding /usr/local/include/yajl to Xcode's "Header Search Paths" property, I just added /usr/local/include
BINGO.. problem solved.

shawn

p.s. My compile was failing with the message 'yajl/yajl_parse.h: No such file or directory' and yet /usr/local/yajl/yajl_parse.h WAS present (and readable) and the Header Search Path *did* specify /usr/local/include/yajl.

When I ran 'sudo dtrace -s /dev/stdin | grep yajl'
and then typed:

Code:
syscall::open*:entry
{
   printf("%s %s", execname, copyinstr(arg0));
}

followed by Enter
followed by Control-D
followed by recompiling in Xcode... (oof!)

I saw that Xcode was trying to open /usr/local/include/yajl/yajl/yajl_parse.h.
So I just removed the extra yajl in the "Header Search Path".

BUT SURELY THIS SHOULDN'T BE NECESSARY`?!
CAN ANYONE COMMENT?
 
Yep

I think I can (if very late). I had the same problem as you, and found your post via google search. Posting this response for the next person who does that.

Make sure you are editing your Target's settings, and not your Project's or executable's settings. I have the same version of XCode as you, and my Target inherits "User Header Search Path" from the Project, but not "Header Search Path". I had to enter it directly into the target.

I am betting they fixed this for newer versions of XCode (which you and I do not have).

THANKS A BUNCH! This is 100% true, even in the latest XCode. Despite editing settings for All Configurations, settings for the target were not changed. This is one of the most "confusing" (to avoid placing undo blame on any particular hugely successful computer manufacturer/software developer) parts of the Xcode development system. Is this documented anywhere ? And even if so, wouldn't the documentation simply be a big unwieldy list of settings that do transfer to the target vs. those that do not. Hmm....
 
How to make xcode find user headers

I was just suffering a similar issue, Xcode was not picking headers from a source code "library".
Thought I'd add to this thread since it was the thread that came up for me in Google.

The path I was trying to reach was:
/Users/user_name/progs/iOS/yajl/lloyd-yajl-f4baae0/src

To make it work, I found you MUST put this path on "User Header Search Paths", NOT on "Header Search Paths". I presume Xcode (or gcc?) blocks out a search of a user directory when that user directory is listed under "Header Search Paths".

I did have "Always Search User Paths" checked.

Using <> or "" for the include made no difference.

Including, or not including, a trailing forward-slash on the path made no difference.

I am using Xcode Version 3.2.5 (10M2423).

Hope this helps.
 
Make sure you are editing your Target's settings, and not your Project's or executable's settings. I have the same version of XCode as you, and my Target inherits "User Header Search Path" from the Project, but not "Header Search Path". I had to enter it directly into the target.

I think this is right except that you can just add $(inherited) to the header search paths and it will work as desired.
 
I'm reviving this thread because I'm having the same stupid problems and I've tried everything.

I'm trying to compile a demo program for Allegro. It needs its own libraries (lib files and headers). At first it told me it needed allegro.h and I fixed that by adding search paths for the headers.

Now it's asking me for EVERY SINGLE OTHER HEADER FILE NEEDED. I've linked search paths to ALL DIRECTORIES with the headers, I've even linked folders which were already linked by other folders. I LINKED IT ALL. And Xcode still can't figure out where the damn headers are.

I linked every search path option to every needed directory. What the HECK do I do?

I'm going mad. I just copied the headers to /usr/include.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.