Xcode 10 (iOS 12) does not contain libstdc++6.0.9

后端 未结 14 1913
礼貌的吻别
礼貌的吻别 2020-11-28 21:28

I download the newest Xcode from Apple, but I found I cannot search the library named \"libstdc++6.0.9\".

14条回答
  •  渐次进展
    2020-11-28 21:44

    For me -l"stdc++.6" was added during pod install I found it in 'Pods/Target\ Support\ Files/Pods-SomeTarget/Pods-SomeTarget.debug.xcconfig'

    To resolve the issue you can use post_install handler in Podfile:

    post_install do |installer|
        installer.pods_project.targets.each do |target|
            if target.name == "Pods-SomeTarget”
                puts "Updating #{target.name} OTHER_LDFLAGS"
                target.build_configurations.each do |config|
                    xcconfig_path = config.base_configuration_reference.real_path
                    xcconfig = File.read(xcconfig_path)
                    new_xcconfig = xcconfig.gsub('-l"stdc++.6" ', '')
                    File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
                end
            end
        end
    end
    

提交回复
热议问题