#import <libxml/tree.h> file not found after xcode 6.1 update

user3714144 picture user3714144 · Nov 11, 2014 · Viewed 9.4k times · Source

I am getting lexical or preprocessor issue i.e file not found after xcode 6.1 update. i have followed below stack overflow solution but no luck.

#import <libxml/tree.h> file not found after xcode update

i found libxml2.2.dylib --> it is created during xcode 5 installation.
              libxml2.dylib  --> it is created during latest xcode6 update.

Using finder /usr/lib/

I had used libxml2.2.dylib in xcode 5 but now i am getting above error in xcode 6. 

Also how to add libxml2.2.dylib lib from this /usr/lib/ location because in build Phase i can not navigate to /usr/lib/ path.

Please help me out. thanks in advance.

Answer

Saurabh Prajapati picture Saurabh Prajapati · Nov 11, 2014

in SearchPaths in both Project as well as in target

set HeaderSearchPath and LibrarySearchPaths to /usr/include/libxml2

this thing solve my issue may it will also help you

also set OTHER_LDFLAGS to -lxml2 to avoid any linker issues afterwards