在XCode中添加libxml2 [英] Adding libxml2 in XCode
本文介绍了在XCode中添加libxml2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将libxml2添加到我的Xcode 4项目
I have added libxml2 to my Xcode 4 project following this guide.
But it's not working. Xcode gives me error saying it no such libxml2 directory. What am I doing wrong? Here's the screenshots of the target settings of my project:
Thanks.
解决方案
- add ${SDKROOT}/usr/include/libxml2 to "Header Search Paths" instead of "User Header Search Paths" under yourtarget -> Build Settings -> Search Paths
- link with libxml2.dylib in yourtarget -> Build Phases -> Link Binary With Libraries
- include libxml2 headers with, for instance,
#include <libxml/HTMLparser.h>
and you're off
for better explanation see to this answer http://stackoverflow.com/a/3429301/149663
这篇关于在XCode中添加libxml2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文