1、运行工程出现错误提示 library not found for -lstdc++.6.0.9
解决方法:
拷贝旧Xcode中的库。没有的可以直接去github下载:
https://github.com/zhuozhuo/libstdc-.6.0.9
真机路径:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/lib
模拟器路径:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/lib
2、模拟器报错:Reason: no suitable image found. Did find: /usr/lib/libstdc++.6.dylib: mach-o, butnotbuiltforiOS simulator
解决方法:
需要拷贝旧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并改名为libstdc++.6.dylib后粘贴到新Xcode同样的位置。(注意在/Profiles/Runtimes/iOS.simruntime这里时需要右键显示包内容)。