I just installed Xcode version 4.3.1 and I get this error:
libxml / tree.h file not found
I have also installed Xcode 4.2, and
I already had the header search path and frame work but was getting this error. Forcefully quitting xcode and then restarting it worked for me (I was using xcode 7.2)
It appears in 4.3.1, you need to include the Header Search Paths in the Targets as well as the project. I'm not sure if this was an issue with moving from 4.2 to 4.3.1, but I just update to Lion and ran into the same issue.
I ran into this again today, I would recommend you wrap the path in quotes:
"$(SDKROOT)/usr/include/libxml2"
I wasted half an hour on this due to having spaces in my path.
In debug/release add the search path to Any Architecture | Any SDK That is click the + button near debug and add ${SDKROOT}/usr/include/libxml2 Similarly do the above for release also
I solved the problem by setting the Header Search Path to:
${SDK_DIR}/usr/include/libxml2
and Always Search User Paths to NO (which is strongly suggested anyway) This just in the target.
I had to configure the other Linker Flags
like this:
for Debug and Release do Add Build Settings
(lower right corner) and Add Conditional Settings
. Then, select Any iOS Simulator SDK
and insert the Setting -lxml2