Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 534
Sergio Rodríguez Avatar asked Mar 12 '12 12:03

Sergio Rodríguez


2 Answers

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 
like image 171
jmstone617 Avatar answered Oct 04 '22 04:10

jmstone617


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:

Target build settings

You can also verify that the path exists on your file system.

like image 31
FluffulousChimp Avatar answered Oct 04 '22 02:10

FluffulousChimp