2015-12-07 55 views
1

我在項目中使用xmmp庫。當我在我的項目中添加庫文件夾時,我得到了這個錯誤xmpp 'libxml/xmlversion.h' file not found在谷歌後我得到這個解決方案轉到項目 - >構建設置並將「$SDKROOT/usr/include/libxml2」添加到標題搜索路徑中,它完美地工作。但是現在出現了新問題。新的三個錯誤附加。列表如下:在xcode 7.1中找不到xmpp'libxml/xmlversion.h'文件

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) 

回答

4

我解決了我的問題,在「Link Binary With Libraries」中添加libresolv.tdd

+0

謝謝你,我也有同樣的問題。解決您的解決方案.. – MinuMaster

0

對於XCode8在我的構建設置中,我將/usr/local/opt/libxml2/include添加到了我的用戶標題搜索路徑。

我還在同一行的下拉菜單中添加了Select recursive->Yes,因爲您添加了上述搜索路徑。