Xcode 10编译错误:library not found for -lstdc 及 Multiple commands produce

1、Error: Multiple commands produce ***************

  • 解决办法:
    Xcode--File--Workspace Settings--Build System--legacy Build System
选择:legacy Build System

2、Error: library not found for -lstdc++. ****

  • 解决方法:
    苹果的解释是libstdc++已经标记为废弃,建议大家使用经过了llvm优化过并且全面支持C++11的libc++库
    拷贝以前Xcode的缺失的 libstdc++、libstdc++.6、libstdc++6.0.9 到新的SDK下。
    根据调试方式不同,真机和模拟器文件放置路径存在差异,分别复制对应的Lib文件到下面的路径即可解决Xcode编译报错`:

路径及下载地址如下:

  • For Device

Put tbd copy to the path:

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

  • For Simulator

Put dylib copy to the path:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

Put tdb copy to the path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

  • Download

直接 Clone or Download Zip 进行文件下载

也可以点击这里进行文件下载

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

推荐阅读更多精彩内容