运行老程序报错dyld: Library not loaded: /usr/lib/libstdc++.6.dylib解决方案

这个错误原因是因为iOS12.0之后去掉了lstdc++.6.0.9.tbd动态库,也就是Xcode10以后的版本会有这个问题。
那么首先去Xcode9或者之前的版本,下载到本地,然后放入对应的文件夹就好了。

路径如下(Xcode11,如果只需要真机,就只放在真机对应的路径下就好了):

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

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

真机(iPhone):
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容