Why am I getting this "libxml/tree.h file not found" error?

Sergio Rodríguez picture Sergio Rodríguez · Mar 12, 2012 · Viewed 41.8k times · Source

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

Answer

jmstone617 picture jmstone617 · Mar 19, 2012

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