【问题标题】:Swift build error_if_any_output_files_are_specified_they_all_must_be快速构建 error_if_any_output_files_are_specified_they_all_must_be
【发布时间】:2018-09-18 16:28:30
【问题描述】:

在 Xcode 10 上转换为使用新的构建系统时,我的几个扩展目标的输出中出现以下错误。

<unknown>:0: error: if any output files are specified, they all must be Command CompileSwift failed with a nonzero exit code

我已经在网上寻找了解决方案,但我能找到的关于这个错误的唯一参考是 Swift 编译器源代码本身。

有谁知道这个错误实际上是如何触发的,或者我可以做些什么来修复它?

【问题讨论】:

  • 当我在项目设置中将“始终嵌入 swift 标准库”标志设置为 NO 时,这似乎消失了。这不是一个真正的解决方案,我不明白这里的机制。
  • 没有一种变通方法对我们的项目有帮助。这真的是一个大场面,我们根本无法归档我们的应用程序。 (使用 Xcode 的正常构建工作正常,但不能归档)...还有其他想法吗?

标签: swift build compiler-errors xcode10


【解决方案1】:

好的,我在我们的一个项目中遇到了同样的问题。构建或归档总是会因错误 &lt;unknown&gt;:0: error: if any output files are specified, they all must be 而停止。

我们的解决方案是将Compilation Mode 设置为Incremental 而不是Whole Module

这意味着,您必须忽略 Validate Project Settings 警告:

【讨论】:

  • 好电话。这至少为我节省了半天时间;)
  • 谢谢。此修复还修复了“错误:重复输入文件”问题。有人能解释一下这个咒语背后的原因吗?
  • 感谢上帝我找到了你!我现在可以睡觉了:)
猜你喜欢
  • 1970-01-01
  • 2014-12-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-01-15
  • 2012-02-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多