Swift build error_if_any_output_files_are_specified_they_all_must_be

≡放荡痞女 提交于 2020-01-23 02:48:06

问题


When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.

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

I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.

  • https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be

Does anyone know how this error is actually triggered, or what I can do to fix it?


回答1:


Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.

The solution for us was to set Compilation Mode to Incremental instead of Whole Module.

This means, you have to ignore the Validate Project Settings warning:



来源:https://stackoverflow.com/questions/52390963/swift-build-error-if-any-output-files-are-specified-they-all-must-be

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!