5

When I use hpple and build, aways show " 'libxml/tree.h' file not found " error.

I have , set [Header Search Path] "${SDKROOT}/usr/include/libxml2" set [Other Linker Flag] value as "-lxml2"

Sam Niu
  • 143
  • 1
  • 10
  • 1
    possible duplicate of [libxml/tree.h no such file or directory](http://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directory) – Pfitz Dec 07 '12 at 10:52

2 Answers2

7

Oh, sorry, I just set the TARGETS's Build Settings forgot set the PROJECT -->Build Settings.

Sam Niu
  • 143
  • 1
  • 10
2

Step 1: Target--> In Build settings-->Header search path-->press return(enter) key--->replace /usr/include/libxml2

Step 2: Target--> In Build phase--> confirm it whether "libxml2.dylib" framework is present, if not added

Step 3: Target--> In Build phase--> search libxml2.dylib then click add button

Refer Screenshot:

enter image description here

  • Note: for step 1, in later XCode versions (6.x, 7.x, etc.) use this for the header search path: $(SDKROOT)/usr/include/libxml2 I think a problem in newer XCode is a lack of the parentheses around SDKROOT. – blalond Aug 23 '16 at 16:30