iOS学习iOS OCiOS Swift

Xcode10 Library not loaded: /usr

2018-12-27  本文已影响24人  _会飞的鱼

由于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 等。

解决方法

模拟器库添加地址

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib

添加三个文件 到xcode 9 版本中找到这3个文件 71A09C627C6165F14753EB4D4B1A44D1.png

真机库添加地址

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

附件为整理的库文件
https://pan.baidu.com/s/18dYbfIFtImtWKeBiGKqxGA

上一篇下一篇

猜你喜欢

热点阅读