xcode10 library not found for -lstdc++.6.0.9

苹果在XCode10和iOS12中移除了libstdc++这个库,由libc++这个库取而代之,

    拷贝旧Xcode中的库,放到新的xcode中

    真机路径
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
    
    模拟器路径
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/


    替换完成后在模拟器iOS10.0以上运行会出现一个错误:
    
    Reason: no suitable image found.  Did find:
    /usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
 
 
 
    须要把 libstdc++.6.dylib  这个文件放到下面这个路径下
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
复制代码
相关文章
相关标签/搜索