libxml2 xpath issue

libxml2 xpath issue
0.0 0


I used xpath of libxml2 to parse xml document.
The header(#include <libxml/tree.h> #include <libxml/xpath.h>) were successed included. However , error occured when i complile.Pls see below.

error: ‘xmlXPathObjectPtr’ does not name a type
error: ‘xmlXPathFreeObject’ was not declared in this scope
error: xmlXPathContextPtr’ was not declared in this scope
error: ‘xmlXPathNewContext’ was not declared in this scope
and so on.

Does anyone could help me? thanks in advance.


who can help me?


i downloaded android source and compile libxml2.


Why don’t you use the static library of libxml2 in cocos2d-x?


Because, libxml2 which is in cocos2d-x doesn’t support xpath.


Your libxml2 library may conflict with the library in cocos2d-x!
Did you build it as a static library or dynamic library? If it’s static library, it may cause problems.


I downloaded latest source of android and built it as a static library. I removed ICU support and it is running normally.