zoukankan      html  css  js  c++  java
  • Xcode6: CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...

    CocoaPods 错误 target overrides the `OTHER_LDFLAGS`...

    Xcode 升级到 6.0 后,更新 CocoaPods,出现了如下的警告

    [!] The `Paopao [Debug]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
        - Use the `$(inherited)` flag, or
        - Remove the build settings from the target.
    
    [!] The `Paopao [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
        - Use the `$(inherited)` flag, or
        - Remove the build settings from the target.
    
    [!] The `Paopao [Release]` target overrides the `PODS_ROOT` build setting defined in `Pods/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.
    
    [!] The `Paopao [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/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.
    

     这种警告是不能忽视的,它带来的直接后果就是无法通过编译。

    而产生此警告的原因是项目 Target 中的一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题。

    我想要使用 CocoaPods 中的设置,分别在我的项目中定义`PODS_ROOT` 和 `Other Linker Flags`的地方,把他们的值用`$(inherited)`替换掉,进入终端,执行

    pod update
    

     警告没了,回到 Xcode,build通过。

    网上还流行另外一种简单粗暴的方法

    点击项目文件 project.xcodeproj,右键`显示包内容`,用文本编辑器打开`project.pbxproj`,删除`OTHER_LDFLAGS`的地方,保存,回到 Xcode,编译通过。

    参考资料

  • 相关阅读:
    Scala程序设计(第2版)
    会声会影X6 DV影片制作--编辑--刻盘实战从入门到精通
    Perl进阶(第2版)
    网络知识与应用
    「C」 函数、运算、流程控制
    OC中属性readwrite,readonly,assign,retain,copy,nonatomic 各是什么作用,在那种情况下用?
    OC-nonatomic和atomic相关
    C++之类与对象(1)
    C++对C语言的非面向对象特性扩充(3)
    C++对C语言的非面向对象特性扩充(2)
  • 原文地址:https://www.cnblogs.com/ihojin/p/xcode6-cocoapods-error.html
Copyright © 2011-2022 走看看