ios – ld:找不到-lstdc .6的库

前端之家收集整理的这篇文章主要介绍了ios – ld:找不到-lstdc .6的库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Xcode版本更新到10.0 beta后,开始获取“ld:找不到-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更改),但它位于开发人员/下载部分

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,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相关文章