运行老程序报错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/

你可能感兴趣的:(运行老程序报错dyld: Library not loaded: /usr/lib/libstdc++.6.dylib解决方案)