Why GDataXML error for importing <libxml/tree.h>

1.3k Views Asked by At

Any body could help me please! I want to use GDataXML but when I copy the GData files to my project the compiler gives me error "file not found" for this line :

#import <libxml/tree.h>

I think it has something to do with the instruction of using GData, because in above comment it says:

// libxml includes require that the target Header Search Paths contain
//
//   /usr/include/libxml2
//
// and Other Linker Flags contain
//
//   -lxml2

But I dont understand what should I do, would you please help me?

2

There are 2 best solutions below

0
On BEST ANSWER

Hey guys this is very important step for the beginners that I found it for using

#import <libxml/tree.h>

here is the link that shows how to use it : http://iphone-bitcode.blogspot.com/2011/06/gdataxml-is-googles-xml-processing.html

0
On

In later XCode versions (6.x, 7.x, etc.) add this to header search path:

$(SDKROOT)/usr/include/libxml2

I think a problem in newer XCode is a lack of the parentheses around SDKROOT.

(Note: to find "Header Search Paths", go to Project Editor : Build Settings : Search Paths : Header Search Paths.)