我是ios編程的全新手。克隆了一個朋友項目。當試圖建立(解決了很多其他錯誤後),我收到以下錯誤:ld:找不到的庫-lAFNetworking xcode
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我檢查了波德文件和搜索項目AFNetworking,並且它的存在。不知道發生了什麼問題。
我是ios編程的全新手。克隆了一個朋友項目。當試圖建立(解決了很多其他錯誤後),我收到以下錯誤:ld:找不到的庫-lAFNetworking xcode
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我檢查了波德文件和搜索項目AFNetworking,並且它的存在。不知道發生了什麼問題。
錯誤消息指示找不到庫。
確保:
請嘗試在您的Mac中安裝COCOAPOD應用程序。
嘗試重新連接AFNetworking here is the link please follow the instruction
添加$(inherited)
標誌到LIBRARY_SEARCH_PATHS
在build settings
Xcode目標。
1.去除來自其他鏈接標誌 路徑2.Clean構建 3.Run代碼
與Albert.Qing的回答在http://stackoverflow.com/questions/12002905/ios-幫助build-fails-with-cocoapods-can-find-header-files,問題已解決。謝謝 – c00der
嗨,這樣做之後,我又因爲我使用的AFnetworking版本而出現了另外20個錯誤。我在Pod文件中將其更改爲版本2,並進行了pod安裝,現在又一次出現相同的錯誤。那裏可能會出現什麼問題? – c00der
檢查Pod安裝是否確實更新了AFNetworking軟件包。運行pod安裝時,應該列出安裝的版本,並且您也可以在Podfile.lock中找到它。另請參閱此鏈接 - https://guides.cocoapods.org/using/pod-install-vs-update.html – little