【问题标题】:Cocoapods error target overrides build setting definedCocoapods 错误目标覆盖定义的构建设置
【发布时间】:2018-02-12 18:12:55
【问题描述】:

我在安装 Tesseract OCR 的 pod 时遇到问题。

pod 'TesseractOCRiOS', '4.0.0'

它会抛出错误

[!] The `Test [Debug]` target overrides the `CLANG_CXX_LIBRARY` build setting defined in `Pods/Target Support Files/Pods-Test/Pods-Test.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

在哪里可以找到 CLANG_CXX_LIBRARY 标志?

当我在构建设置中搜索 CLANG_CXX_LIB 标志时,它向我展示了 C++ 标准库并设置为编译器默认值,我无法向其添加 $(inherited)。

我尝试将 $(inherited) 添加到 OtherLinker 标志,但没有帮助。

Pod 文件:

platform :ios, '9.0'

def application_pods
    #use_frameworks!
    pod 'TesseractOCRiOS'
    pod 'Realm'
end

def extension_pods
    #use_frameworks!
    pod 'Realm'
end


target 'Test' do
  # Pods for Test
  application_pods
end

target 'CallerID' do
   extension_pods
end 

编辑:

这仅在 Xcode 9.3 beta 中发生。我检查了 Xcode 的 prod 版本,我没有这个问题。

【问题讨论】:

    标签: xcode cocoapods xcode9-beta


    【解决方案1】:

    CLANG_CXX_LIBRARY 标志来自 TesseractOCRiOS podspec

    podspec 很可能应该使用 pod_target_xcconfig option 而不是已弃用的 xcconfig,因此它只会影响 pod 而不是整个工作区的构建选项。

    【讨论】:

    • 我需要做什么来解决这个问题?
    • 在 Tesseract podspec,github.com/CocoaPods/Specs/blob/master/Specs/b/d/c/…,他们正在使用 xcconfig。
    • 一些选项 - 1. 联系 podspec 维护人员进行修复 2. 使用修复创建您自己的 podspec 文件 3. 每次运行 pod install/update 时手动更新 CocoaPods 生成的 xcconfig 文件 4.接受错误 5. 尝试旧的 CocoaPods 版本
    猜你喜欢
    • 1970-01-01
    • 2013-08-24
    • 2017-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多