库文件libstdc++.6.0.9. dylib、libstdc++.6. dylib、libstdc++. dylib、libstdc++.6.0.9.tbd、libstdc++.6.tbd...

由于Xcode10 废弃了libstdc++,库文件libstdc++.6.0.9. dylib、libstdc++.6. dylib、libstdc++. dylib、libstdc++.6.0.9.tbd、libstdc++.6.tbd、libstdc++.tbd也删除,所以在编译时某些模块会error或crash。

如:

dyld: Library not loaded: /usr/lib/libstdc++.6.dylib

Referenced from: /Users/xxh/Library/Developer/CoreSimulator/Devices/063C2EF2-5F01-4EC6-A34A-5E10EDF24C9E/data/Containers/Bundle/Application/B23D9872-61B0-4A7C-9FAA-0116FAC1563A/DYEngineer.app/DYEngineer

Reason: no suitable image found.  Did find:

/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator 等。

解决方案是从Xcode9的包中替换相应的文件。

库文件.png

-libstdc++.6.0.9.tbd-libstdc++.6.tbd-libstdc++.tbd-libstdc++.6.0.9.dylib-libstdc++.6.dylib-libstdc++.dylib

写在前方笔者建议:最好把缓存清除下再操作

一、Xcode10支持手机

方案:需要增加一个地址3个文件

地址1:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libstdc++.6.0.9.tbd

二、Xcode10支持模拟器

方案:需要增加两个个地址3+3==6个文件

地址2:/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

地址3:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libstdc++.6.0.9.tbd

三、macOS开发需要再增加一个地址3个文件

地址4:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libstdc++.6.0.9.tbd

四、在Xcode7曾出现大规模病毒感染,而后苹果在Xcode8也封禁了插件,建议libstdc++文件从Xcode9中

--显示包内容获取。

作者:雨_田

链接:https://www.jianshu.com/p/7f0af489a307

來源:简书

注意这里这里用模拟器运行的时候 如果报错 libstdc++.6.0.9  缺少,那么一定要拷贝  2  3文件到对应的项目里面去

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容