Xcode C++ Header Error ('climits' not found)

Hello, I am working on a Flutter package and need to integrate OpenCV. I generated an XCFramework and linked it through the .podspec file.

However, I am encountering an error where Xcode does not seem to recognize some C++ headers, even though I added the necessary configurations in the .podspec.

Here is what I included in my .podspec:

  s.xcconfig = {
      'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
      'CLANG_CXX_LIBRARY' => 'libc++',
      "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
  }

  s.preserve_paths = 'opencv2.xcframework'
  s.vendored_frameworks = 'opencv2.xcframework'
  s.frameworks = 'AVFoundation'
  s.library = 'c++'

When running the project in Xcode, I encounter this error:

error: 'climits' file not found

This error is triggered by one of the headers in the OpenCV library. I am using Xcode 16.1

same as you.

Xcode C++ Header Error ('climits' not found)
 
 
Q