0
votes

I'm having trouble installing the pods for Tesseract OCR.

pod 'TesseractOCRiOS', '4.0.0'

and it throws the error

[!] 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.

Where can I find the CLANG_CXX_LIBRARY flag ?

When I search for CLANG_CXX_LIB flag in build settings , it showed me the C++ standard library and set to compiler-default and I can't add $(inherited) to it.

I tried adding $(inherited) to OtherLinker flags but it didn't help.

Podfile:

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 

Edit:

This is happening only with Xcode 9.3 beta. I checked with prod release of Xcode and I do not have this issue.

1

1 Answers

2
votes

The CLANG_CXX_LIBRARY flag is coming from the TesseractOCRiOS podspec.

Most likely the podspec should be using the pod_target_xcconfig option instead of the deprecated xcconfig so it only impacts the build options for the pod instead of the whole workspace.