我剛剛開始使用CocoaPods,並且在從終端進行pod安裝時出現以下錯誤(我的項目名爲babyMilestones,我試圖使用CocoaPods for ShipLib框架)。 :XCode 6 CocoaPods錯誤:目標覆蓋`OTHER_LDFLAGS`構建設置
The
babyMilestones [Release]
target overrides theFRAMEWORK_SEARCH_PATHS
build setting defined inPods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)` flag, or - Remove the build settings from the target.
我收到此錯誤的標題搜索路徑和框架搜索路徑。
當我嘗試構建我的項目時,我在#import行上發現一條錯誤,指出無法找到ShipLib/ShipLib.h文件。在我的項目導航器中,我的Pods項目正常顯示,並且ShipLib框架可見。
我從來沒有明確地設置任何這些搜索路徑,我只是讓XCode 6做這件事。我發現這個答案:The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig 我曾嘗試以下:
刪除所有框架搜索路徑的構建設置。這沒有解決問題
然後,我添加$(繼承)到框架搜索路徑。我做了Clean然後Build。這給了以下類型的新的錯誤:
ld: warning: directory not found for option '-L/Users/billpaystation/Documents/iOS/babyMilestones/babyMilestones/Pods/build/Debug-iphoneos' ld: warning: directory not found for option '-F' Undefined symbols for architecture i386: "_OBJC_CLASS_$_ActionSheetDatePicker", referenced from: objc-class-ref in EditItemViewController.o "_OBJC_CLASS_$_SYSincerelyController", referenced from: objc-class-ref in EditItemViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
行動表上選擇器和真誠控制器是我想帶豆莢添加庫。
- 我注意到libPods.a在我的文件檢查器的框架下是紅色的。所以我去了計劃 - >編輯計劃 - >並添加了豆莢到生成。 我並不十分理解整個目標/構建設置,我可能會讓它變得更糟,嘗試這麼多不同的事情。任何幫助,將不勝感激!
您應該將$(繼承)添加到框架搜索路徑。你能告訴我們那個步驟後的其他錯誤嗎?也許你需要另外感受一些東西。 – euthimis87 2014-10-19 01:02:03
如果我將$(繼承)添加到我的框架搜索路徑,我更新了我收到的鏈接器錯誤的問題。 – leenyburger 2014-10-19 10:57:23