Error: libxml / parser.h: No such file or directory

I am trying to use XML (chapter 10 in application programming software for iPhone and iPad), and I ran into small problems.

In the Header Search Paths in Build Settings , I have this path:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/libxml2/

This is all good and good, but then:

 #import <libxml/parser.h> #import <libxml/tree.h> error: libxml/parser.h: No such file or directory 

If I flip the import:

 #import <libxml/tree.h> #import <libxml/parser.h> error: libxml/tree.h: No such file or directory 

Weird

At the moment I have this:

 #import <libxml/catalog.h> // Dirty hack #import <libxml/parser.h> #import <libxml/tree.h> error: libxml/catalog.h: No such file or directory 

But this is not suitable for a production application.

+4
source share
2 answers

As it turned out, it was a trivial fix. I closed the project to work on another, and when I opened it again, the error disappeared. Not quite what I would expect, but hey, it works now.

"When in doubt, reboot."

+5
source

Try changing the header search path to ${SDK_DIR}/usr/include/libxml2 .

+12
source

Source: https://habr.com/ru/post/1347729/


All Articles