Closed hactar closed 5 years ago
Try changing PodFile as follows.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios,'9.0'
project './example.xcodeproj'
use_frameworks!
target 'example' do
pod 'GEOSwift'
# and more...
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'geos'
# change libstdc++ to libc++
config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
end
end
end
end
I had the same problem (but using GEOSwift in my custom library so using a podspec instead of a podfile)
I added the post_install in my podpsec, but after installing I had this error :
Include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead
To resolve, go to Pods -> geos -> Build settings -> Apple Clang - Language - C++ Then change "C++ Standard Library" from libstdc++ to libc++
Edit : if you use GEOSwift as a dependency of your library, you do not need the post_install in your podspec, just change the build settings as described above
@macdrevx, https://github.com/GEOSwift/geos/pull/3 looks good! You should be able to merge it now
Version 3.7.0 of this pod is now available. It should resolve these issues.
I don't know if this issue is appropriate here on the upstream geos library, but as you guys are the swift guys I'm posting it here.
iOS 12 has dropped libstdc++, hence geos does not compile with the newest Xcode, instead you get the error:
'stdexcept' file not found
The drop is being discussed here for example...
https://stackoverflow.com/questions/50694822/xcode-10-ios-12-does-not-contain-libstdc6-0-9
In order for this to work in future, it appears geos would need to be updated to use libc++ instead...