zoukankan      html  css  js  c++  java
  • Linker Command failed with exit code 1

    1.当xcode编译出现这种错误提示的时候,右击问题-->Reveal in Log 查看详细的错误信息

    2.通过log可以看到错误原因是:ld: library not found for -lstdc++.6.0.9

    3.出现这种错误的原因是:

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

    苹果的解释是libstdc++已经标记为废弃有5年了,建议大家使用经过了llvm优化过并且全面支持C++11的libc++库。

    解决方法:将xcode9中 libstdc++ 库导入到xcode10中

    Xcode10支持手机:

    将如下三个文件拷贝到:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/

    libstdc++.6.0.9.tbd

    libstdc++.6.tbd

    libstdc++.tbd

    这三个文件从Xcode9中--显示包内容获取。或者点此链接下载

     Xcode10支持模拟器:

    方法和支持手机的一样,只是拷贝的路径不同

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
    分别从Xcode9中相应的路径将这三个文件拷贝到Xcode10中相应的路径里
  • 相关阅读:
    Kibana安装
    elasticsearch安装
    分布式_zookeeper
    通信协议_三次握手_四次挥手
    Spring中的IOC_源码_随笔
    Spring设计模式_策略模式/其他
    Spring设计模式_工厂模式
    spring设计模式_代理模式
    docker常用指令01
    ubuntu18下安装docker
  • 原文地址:https://www.cnblogs.com/ring1992/p/10299380.html
Copyright © 2011-2022 走看看