Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将 hpple 文件添加到我的 Swift 项目中,并在以下导入时在我的 XPathQuery.m 类中收到以下错误消息:
#import <libxml/tree.h>
--> 'libxml/tree.h' 文件未找到我也收到消息:词法或预处理器问题。
我试图将二进制文件与库(libxml2.dylib 等)链接起来,但我认为我真的不需要在 Swift 中再这样做了。
我错过了什么?
选择项目的构建设置
$SDKROOT/usr/include/libxml2
Header Search Paths
-lxml2
Other Linker Flags