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
In your question, you have a space between the /
and usr
. Perhaps this is a typo, but the path is:
/usr/include/libxml2
Just confirm that is the path in the target build settings:
You can also verify that the path exists on your file system.
Include the following in your header search path and you should be immune to any weirdness Apple does with their Xcode updates:
$(SDKROOT)/usr/include/libxml2
The correct path is (for 'Header Search Path'):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/libxml2/**
I have the same problem.
I try set path( 'Header Search Path') to /usr/include/libxml2
,build error!
I try set path( 'Header Search Path') to $(SDKROOT)/usr/include/libxml2
,build error!
but I set path to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/libxml2
build succeeded!
2 solutions:
$(SDKROOT)/usr/include/libxml2
xcode-select --install
XCode 4 should have the command line tools install option in preferences>downloads section.I'd personally go with the second one.
Xcode 6:
Do the following:
1.0)Select "mainApp" Target : Go to settings ->In "Header Search Path"
1.1)Add this: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2.
2.0)Select "TestApp" Target : Go to settings ->In "Header Search Path"
2.1)Add this: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2.