我在一个项目中使用xmmp库。当我在项目中添加库文件夹时,在谷歌上我得到了这个解决方案后,我得到了xmpp 'libxml/xmlversion.h' file not found
。转到项目->构建设置并将"$SDKROOT/usr/include/libxml2
"添加到标题搜索路径中,这很好。但现在出现了新问题。新增三个错误。列表如下:
ld: warning: directory not found for option '-L/Users/Mac-Devs/Documents/Ferrakkem/DivineIosDialer/../../g729'
Undefined symbols for architecture x86_64:
"_dns_free_resource_record", referenced from:
-[XMPPSRVResolver processRecord:length:] in XMPPSRVResolver.o
"_dns_parse_resource_record", referenced from:
-[XMPPSRVResolver processRecord:length:] in XMPPSRVResolver.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我通过在"将二进制与库链接"中添加libresolv.tdd
解决了我的问题。
对于XCode8在我的构建设置中,我将/usr/local/opt/libxml2/include
添加到我的用户头搜索路径中。
我还添加了Select recursive->Yes
,来自同一行的下拉菜单,就像您添加了上面的搜索路径一样。