美文网首页
Xcode更新之后libstdc++库编译报错

Xcode更新之后libstdc++库编译报错

作者: 小木惊风 | 来源:发表于2019-02-12 10:34 被阅读12次

问题原因

xcode 10 移除了 libstdc++ 库, 替换为 libc++ 库而导致无法找到头文件。

报错信息

屏幕快照 2019-02-12 上午10.16.49.png

解决方案

下载 libstdc++ 库
链接: https://pan.baidu.com/s/1-9Qkv3O7gGJPj--r-8CpPQ 提取码: zr1y
将文件夹中的文件分别对应复制到Xcode中的以下4个目录中即可:

  1. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
  2. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
  3. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
  4. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

操作步骤: Finder -- 右键 -- 前往文件夹


屏幕快照 2019-02-12 上午10.32.40.png

将编号对应的文件复制到对应编号的文件目录中即可。

相关文章

网友评论

      本文标题:Xcode更新之后libstdc++库编译报错

      本文链接:https://www.haomeiwen.com/subject/zneheqtx.html