原因是: 苹果早在 Xcode 8 中 就废弃了 libstdc++, 给了开发者两年时间过渡, 如今在 Xcode 10 中已不再支持.
在 Build Phases > Link Binary With Libraries 中已经搜不到 libstdc++的库了
libstdc++.6.0.9 文件资源可以在百度网盘获取, 提取码:njj8
平台 | 文件夹 | 文件名 | 文件大小 | 路径 |
---|---|---|---|---|
模拟器运行 | CoreSimulator | libstdc++.6.0.9.dylib | 766,624 | /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/ |
模拟器编译 | iPhoneSimulator | libstdc++.6.0.9.tbd | 206,800B | /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/ |
iOS 真机 | iPhoneOS | libstdc++.6.0.9.tbd | 209,673B | /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/ |
macAPP | MacOSX | libstdc++.6.0.9.tbd | 206,751B | /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ |