更新Xcode11Beta后,因缺乏libstdc++.6.dylib模拟器报错问题解决

更新Xcode11后由于缺乏libstdc++.6.dylib文件报错,按照Xcode10的方法设置后运行模拟器发现仍是报错,错误以下:c++

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对应路径中,路径以下:bash

/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文件夹,因此没法设置。app

查找资料后发现Xcode11的CoreSimulator文件夹被移至到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/这个路径下,因此将旧的Xcode中的libstdc++.6.0.9.dylib、libstdc++.6.dylib、libstdc++.dylib三个文件移至新目录下就能够解决上述问题。路径以下:ui

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
复制代码
相关文章
相关标签/搜索