目標...覆蓋`Pods / Pods.xcconfig中定義的`OTHER_LDFLAGS`構建設置我已經合并SpatialIite到一個Xcode項目中,該項目使用頭文件Proj.4,只有一個頭文件。兩者都是Xcode項目并具有靜態目標。我正在嘗試從git子模塊遷移到Cocoapods。由于靜態目標似乎很難與Cocoapods一起使用,我只想以通常的方式構建項目。我做了podspec Proj.4。寫完podfile之后SpatialLite我收到了警告:[!] The target `SpatialiteIOS [Debug]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The target `SpatialiteIOS [Debug]` overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Pods.xcconfig'.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The target `SpatialiteIOS [Debug - Release]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.[!] The target `SpatialiteIOS [Debug - Release]` overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Pods.xcconfig'.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.我讀過這個問題,但我對這些警告意味著什么以及我能做些什么來修復它幾乎一無所知。另外一個問題是,當我打開工作區以及單獨打開SpatiaLite項目時,兩者都是針對Mac OSX 64的,當它被認為是一個iOS項目時。我的podfile確實說“platform:ios”。
3 回答

繁花如伊
TA貢獻2012條經驗 獲得超12個贊
您的構建設置與Cocoapods想要的默認構建設置之間存在沖突。要查看Cocoapods構建設置,請在項目中的Pods / Target Support Files / Pods - $ {PROJECTNAME} /中查看.xcconfig文件。對我來說這個文件包含:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Commando"OTHER_LDFLAGS = -ObjC -framework Foundation -framework QuartzCore -framework UIKitPODS_ROOT = ${SRCROOT}/Pods
如果您對Cocoapods設置感到滿意,請轉到項目的Build Settings,找到合適的設置并點擊Delete鍵。這將使用Cocoapods的設置。
另一方面,如果您需要使用自定義設置,則將$(繼承)添加到該設置。

郎朗坤
TA貢獻1921條經驗 獲得超9個贊
我在終端中看到了pod命令的這3個錯誤
pod install
[!] MY_APP [Debug / Release]目標覆蓋HEADER_SEARCH_PATHS ...
[!] MY_APP [Debug / Release]目標覆蓋OTHER_LDFLAGS ...
[!] MY_APP [Debug / Release]目標覆蓋GCC_PREPROCESSOR_DEFINITIONS .. 。
通過添加$(繼承)來消除所有這3個錯誤
標題搜索路徑
其他鏈接器標志
預處理器宏
在項目 - >目標 - >構建設置
現在命令將運行而不會出現任何錯誤
pod install
添加回答
舉報
0/150
提交
取消