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
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.
In my case, the main difficulty was that the app is composed of two projects, with the second one having several targets. It took me a while to realise that the error was occurring in one of those targets and not in the target of the main project. Then I just had to add the (in)famous
$(SDKROOT)/usr/include/libxml2
in the Header Search Paths of that particular target.I am using Xcode Version 5.0.1
I had to configure the
other Linker Flags
like this: for Debug and Release doAdd Build Settings
(lower right corner) andAdd Conditional Settings
. Then, selectAny iOS Simulator SDK
and insert the Setting-lxml2
I ran into this again today, I would recommend you wrap the path in quotes:
I wasted half an hour on this due to having spaces in my path.
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)
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
build succeeded!