开发者

libxml2 in leopard unfound?

开发者 https://www.devze.com 2023-02-26 22:45 出处:网络
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/libxm

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/libxml2 or Header 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消