具有Xcode6的LibXML2.dylib [英] LibXML2.dylib with Xcode6
问题描述
我正在尝试在我的IOS项目中集成libxml2.dylib ,我已经在目标的构建阶段中将该链接链接到链接二进制文件与库当我在模拟器上运行它,但抛出链接器命令失败,退出代码为1(使用-v查看调用)找不到-lxml2的库错误尝试在设备中运行它时 strong>,我还在Build设置的Other Linker标志中添加了-lxml2,仍然无法完成.我是一个初学者,对此我的所有建议都值得赞赏.我使用的是Xcode 6.1和IOS SDK 8.1.
I'm trying to integrate libxml2.dylib in my IOS project,I have linked this library in Link binary with libraries in Build phases for target,its working fine when I run it on simulator,but throws linker command failed with exit code 1 (use -v to see invocation) library not found for -lxml2 error when trying to run it in device,I have also added -lxml2 in Other Linker flags in Build settings,still couldn't get it done.I'm a beginner,any advice on this is highly appreciated.I'm using Xcode 6.1 and IOS SDK 8.1.
推荐答案
这对我有用:
只需将/usr/include/libxml2放在 Target 上的 Header Search Paths 中.
Just put /usr/include/libxml2 in your Header Search Paths on the Target.
我正在使用XCode 6.1.1和优胜美地.
I'm using XCode 6.1.1 and Yosemite.
最诚挚的问候.
这篇关于具有Xcode6的LibXML2.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!