微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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)

原文地址:https://www.jb51.cc/iOS/334472.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐