找不到 libxml2 和 iOS 5.0 SDK / Xcode 4.2 (beta 3) 的标头
似乎不少人在苹果官方开发者论坛上遇到了这个问题,但还没有找到解决方案,因此我想在这里试试运气:)
使用 iOS 5.0 SDK 和 Xcode 4.2 (beta 3) 似乎有些问题搞砸了,找不到 libxml2 的标头。然而,当我浏览 SDK 目录时,我清楚地看到一个名为 libxml2/libxml 的文件夹,其中包含我需要导入的所有标头。
我想知道是否有人找到了解决方案。到目前为止,我发现唯一可行的解决方案是将所有标头复制到项目中,然后修改标头的导入路径(从导入中删除目录)。据我所知,这消除了所有错误,但还懒得去更改 libxml 的所有导入语句,因为我不喜欢这个“修复”。
Seems quite a few people have encountered this issue on the official Apple Developer forums, yet didn't find a solution yet, therefore I want to try my luck here :)
With the iOS 5.0 SDK and Xcode 4.2 (beta 3) it seems something is messed up, the headers for libxml2 cannot be found. Yet as I navigate through the SDK directory, I clearly see a folder called libxml2/libxml with all the headers I need to import.
I wonder if anyone has found a solution for this. So far the only solution I found that might work is copying all headers into the project and then modifying the import path of the headers (removing the directory from the imports). As far as I could see this removes all errors, yet couldn't be bothered to change all import statements of libxml yet since I don't like this "fix".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 StackOverflow 上的另一个答案中找到了解决方案,为了方便起见,我将其发布在这里。
不应使用
${SDK_ROOT}/usr/include/libxml2
,而应使用"${SDK_DIR}"/usr/include/libxml2
。请参阅:LibXML2.dylib 和 Xcode4
I found the solution in another answer on StackOverflow, I'll post it here for convenience.
Instead of using
${SDK_ROOT}/usr/include/libxml2
one should use"${SDK_DIR}"/usr/include/libxml2
.See: LibXML2.dylib and Xcode4