2017-03-02 105 views
0

我有這樣的錯誤缺少必需模塊 '的libxml2'

缺少必需的模塊 '的libxml2'

enter image description here

在我進口

enter image description here

我有我的鏈接l上的模塊ibrary

enter image description here

+0

Command + Swift + K,清除您的項目並重試。 –

+0

您應該只將一個版本的libxml添加到鏈接的框架和庫中。 – clemens

回答

2

在構建設置添加

  • 頭搜索路徑$SDKROOT/usr/include/libxml2
  • 其它鏈接器標記-lxml2

添加libxml2明確地在Xcode 8中不需要鏈接框架和庫

+0

我現在有這個錯誤:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/libxml2/libxml/xmlreader.h:13:10:未找到包含'libxml/xmlversion.h'的文件;用「引號」代替 –

+0

您是否嘗試用「」代替<>?我有很多項目,包括libxml2,沒有任何問題 – vadian

+0

在解決方案之外的Build設置中修復ALWAYS_SEARCH_USER_PATHS = YES。 Thx男人 –