申明,这个是转载于 https://www.codeleading.com/article/61772375451/
技术标签: xcode ios libstdc++.6.0.9
libstdc++.6.0.9.dylib、libstdc++.6.dylib、libstdc++.dylib下载目录如下
链接: https://pan.baidu.com/s/1Ep4fk5Lwsv56zRSoDqLWwg&shfl=shareset 提取码: ncme
更新Xcode11后因为缺少libstdc++.6.dylib文件报错,按照Xcode10的方法设置后运行模拟器发现还是报错,错误如下:
-
Reason: no suitable image found. Did find:
-
/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
-
复制代码
根据原来Xcode10的设置方法,需要将就Xcode的如下路径的libstdc++.6.0.9.dylib、libstdc++.6.dylib、libstdc++.dylib
三个文件拷贝到新的Xcode对应路径中,路径如下:
-
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libstdc++.6.0.9.dylib
-
复制代码
但是发现Xcode11的/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library
路径中并没有CoreSimulator
文件夹,所以无法设置。
查找资料后发现Xcode11的CoreSimulator
文件夹被移至到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/
这个路径下,所以将旧的Xcode中的libstdc++.6.0.9.dylib、libstdc++.6.dylib、libstdc++.dylib
三个文件移至新目录下就可以解决上述问题。路径如下:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/