Add hpple to Swift project - Lexical or Preprocessor Issue

389 Views Asked by At

I am adding the hpple files to my Swift project and get the following error message in my XPathQuery.m class at the following import:

#import <libxml/tree.h>

--> 'libxml/tree.h' file not found I also get the message: Lexical or Preprocessor Issue.

I have attempted to link the binary with libraries (libxml2.dylib and so on) but don't believe I really need to do that any more in Swift.

What am I missing?

1

There are 1 best solutions below

3
vadian On BEST ANSWER

Select the Build Settings of the project

  • add $SDKROOT/usr/include/libxml2 in Header Search Paths
  • add -lxml2 in Other Linker Flags