Xcode 8.3.2 Clang 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44881953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:06:35  来源:igfitidea点击:

Xcode 8.3.2 Clang Error

iosiphonexcode

提问by Mc.Lover

I am trying to update one of my project, when I opened it I performed validated settings, but when I try to build it I just face with this error :

我正在尝试更新我的一个项目,当我打开它时,我执行了经过验证的设置,但是当我尝试构建它时,我只是遇到了这个错误:

Apple Mach-O Linker Error Group : clang: error: linker command failed with exit code 1 (use -v to see invocation)

Apple Mach-O 链接器错误组:clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

with no more infos and I am not using cocoapods or any external frameworks. I just searched everywhere and did any possible solution such as :

没有更多信息,我没有使用 cocoapods 或任何外部框架。我只是到处搜索并做了任何可能的解决方案,例如:

  • Clean and run
  • Searched for duplicate files
  • Check imported header files
  • Delete xxxTest
  • Checked Build Active architecture
  • Validated Settings
  • Checked missing frameworks
  • Restart mac
  • Changed iOS deployment target
  • Disabled bitcode
  • 清洁并运行
  • 搜索重复文件
  • 检查导入的头文件
  • 删除 xxxTest
  • Checked Build Active 架构
  • 验证设置
  • 检查缺失的框架
  • 重启mac
  • 更改了 iOS 部署目标
  • 禁用位码

and etc...

等等...

Is there anything to solve this issue ?!

有什么办法可以解决这个问题吗?!

回答by TheNextman

Right-click the error in the the Issue Navigator. Choose "Reveal in Log" or "Reveal in Project Navigator "and see the actual error message.

右键单击问题导航器中的错误。选择“在日志中显示”或“在项目导航器中显示”并查看实际的错误消息。

回答by Atul Gawali

-Try this 1.Xcode -> Preferences -> Location -> click on derived data path and clear all derived data. 2."Build Phases" -> "Compile Sources" and look for duplicate of classes. 3.Or check if you have "*.m" files in your #import

-试试这个 1.Xcode -> Preferences -> Location -> 单击派生数据路径并清除所有派生数据。2.“构建阶段”->“编译源”并查找类的重复项。3.或者检查你的#import中是否有“*.m”文件

回答by Udaya Sri

I got this error when I forget to update my submodules (Carthage in my case). After I update my submodules I didn't get the error.

当我忘记更新我的子模块(在我的例子中是 Carthage)时,我收到了这个错误。更新我的子模块后,我没有收到错误消息。