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 with the same project I get the same error.
I have configured the header search paths with /usr/include/libxml2
I also tried $(SDKROOT) / usr/include/libxml2
and it didn't work.
I have also put Other Linker Flag with lxml2
The correct path is (for 'Header Search Path'):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/libxml2/**
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.
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.
LibXML2 library solved
SOLUTION!
if you have xcode 4.3.x in /Application
need ONLY add: "/usr/include/libxml2" without quote in Application TARGET -> Header search path.
for this -> double click on the line -> on little window click plus sign an write /usr/include/libxml2
nb - need also add libxml2.dylib to the framework. I use 2.2.7.3
hope help you
I solved the problem by setting the Header Search Path to:
and Always Search User Paths to NO (which is strongly suggested anyway) This just in the target.
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