Why am I getting this “libxml/tree.h file not foun

2019-01-21 07:41发布

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

14条回答
乱世女痞
2楼-- · 2019-01-21 08:24

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
查看更多
干净又极端
3楼-- · 2019-01-21 08:24

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.

查看更多
登录 后发表回答