02
4
内容纲要

最近公司的移动开发工程师被困在老家,项目有紧急需要修改的地方,我只好亲自上阵,打开Xcode改bug。编译的过程发现小伙子前阵子刚刚升级了,遇到了c++头文件无法编译的问题。网上查了一下,发现这是Xcode的通病,三个版本都有类似的问题。

Xcode10 'string' file not found C++头文件缺失问题

将对应文件拷贝到Xcode10对应目录下

真机: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++
模拟器:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/c++

Xcode9 C++头文件github链接:https://github.com/DeCori/Xcode9-cpp.git

Xcode10中缺少的libstdc++6.0.9.tbd库
其中文件夹 1、2、3、4 中的文件分别对应复制到Xcode10中的以下4个目录中即可:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

Xcode11和12文件的1路径发生改变:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib

声明: 本文采用 BY-NC-SA 协议进行授权. 未标注“转”的文章均为原创,转载请注明转自: 解决Xcode 10 、Xcode11、Xcode12升级之后 ‘string’ file not found C++头文件、`libstdc++6.0.9.tbd`库缺失问题

公告栏

欢迎大家来到我的博客,我是dodoro,希望我的博客能给你带来帮助。