ios - ld : library not found for -lstdc++. 6

标签 ios xcode macos xcode10

将 Xcode 版本更新到 10.0 beta 后,开始出现“ld: library not found for -lstdc++.6”错误。相同的代码在 Xcode 9.2 中运行良好

还将 macOS 更新到 10.13.5

最佳答案

针对 iOS 应用程序时,您会遇到此问题。它在发行说明中说明:

Deprecation Notices:

Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS. C++ projects must now migrate to libc++ and are recommended to set a deployment target of iOS 7 or later. Besides changing the C++ Standard Library build setting, developers should audit hard-coded linker flags and target dependencies to remove references to libstdc++ (including -lstdc++, -lstdc++.6.0.9, libstdc++.6.0.9.tbd, and libstdc++.6.0.9.dylib). Project dependencies such as static archives that were built against libstdc++ will also need to be rebuilt against libc++. (40885260)

来源:Release Notes of XCode Beta 2

旁注:
您需要登录才能访问该页面。
链接可能会在下一个测试版中中断(URL 更改),但它位于 Developers/Download 部分

XCode 10 正式发布 release note ,它仍然是这样的:

Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS. C++ projects must now migrate to libc++ and are recommended to set a deployment target of macOS 10.9 or later, or iOS 7 or later. Besides changing the C++ Standard Library build setting, developers should audit hard-coded linker flags and target dependencies to remove references to libstdc++ (including -lstdc++, -lstdc++.6.0.9, libstdc++.6.0.9.tbd, and libstdc++.6.0.9.dylib). Project dependencies such as static archives that were built against libstdc++ will also need to be rebuilt against libc++. (40885260)

关于ios - ld : library not found for -lstdc++. 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51060596/

相关文章:

ios - UIAppearance 代理规则何时应用于新的 View Controller ?

ios - 在用户点击它们之前在后台处理通知 - Swift 3

ios - 为什么我的 iOS 应用压缩得这么好?

macos - Mac 应用程序包 ID 未更改

ios - UITableViewCell 中两个基本相同的 UILabel 的奇怪约束差异

android - 单击 React-Native 上的按钮时如何在 WebView 上执行 Javascript

iphone - ios 中的 HTML 到 PDF 转换

swift - 创建符号断点/修复自动布局问题

objective-c - ARC 是否保证在最后一个强引用消失后立即释放对象?

xcode - zsh : command not found: pod - MAcOS Catalina 10. 15