Iphone leopard中的libxml2未找到?
我在某处读到libxml2在XCode4中可用。然而,我在运行Product>Profile时遇到了很多错误。临时和调试的当前Iphone leopard中的libxml2未找到?,iphone,ios,xcode4,libxml2,Iphone,Ios,Xcode4,Libxml2,我在某处读到libxml2在XCode4中可用。然而,我在运行Product>Profile时遇到了很多错误。临时和调试的当前标题搜索路径设置为:/usr/include/libxml2 但当我在雪豹中浏览这条物理路径时,那里没有libxml2。下面是一个示例错误: *:No such file or directory Libxml/tree.h: No such file or directory. '*' undeclared here (not in a function) 'XML_
标题搜索路径设置为:/usr/include/libxml2
但当我在雪豹中浏览这条物理路径时,那里没有libxml2。下面是一个示例错误:
*: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 function)
打开iPhone应用程序项目的生成设置并设置
其他链接器标志=-lxml2
- 和
标题搜索路径:$(SDKROOT)/usr/include/libxml2
或标题搜索路径:/usr/include/libxml2
在XCode下开发时,GCC使用重新定位SDK根的-isysroot
选项。如果在标题搜索路径中添加/usr/include/libxml2
,则在编译时会将其转换到当前SDK中的usr/include/libxml2
文件夹。您使用的XCode版本是什么?这可能是问题所在。至少对于iphone来说,它不是内置的,你必须自己添加框架谢谢,只是在Mountain Lion标题搜索路径中添加一条注释:/usr/include/libxml2似乎不再有效。