I read somewhere that libxml2 is available in XCode4. However, I'm getting a lot of errors running Product > Profile. The current Header Search Paths for Adhoc and Debug is set to: /usr/include/libxml2
But when I browse through this physical path in Snow Leopard, there is no libxml2 there. Here is a sample error:
*:No such file or directory
Libxml/tree.h: No such file or directory.
'*' undeclared here (not in a function)
'XML_ELEMENT_NODE' undeclared here (not in a function)
'*' undeclared here (not in a function)
'XML_ATTRIBUTE_NODE' undeclared here (not in a开发者_JAVA百科 function)
Open up the build settings for your iPhone App project and set
Other linker flags = -lxml2- and
Header Search Paths: $(SDKROOT)/usr/include/libxml2orHeader Search Paths:/usr/include/libxml2
When developping under XCode, GCC uses the -isysroot option that relocates the root of the SDK. If you add /usr/include/libxml2 in the header search paths, it will be translated at compilation time to the usr/include/libxml2 folder INSIDE the current SDK.
加载中,请稍侯......
精彩评论