Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Xcode编译错误_Ios_Xcode_Swift_Command - Fatal编程技术网

Ios Xcode编译错误

Ios Xcode编译错误,ios,xcode,swift,command,Ios,Xcode,Swift,Command,我在使用Xcode的代码中反复遇到这个错误 <unknown>:0: error: merge-module command failed with exit code 1 (use -v to see invocation) Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 :0:

我在使用Xcode的代码中反复遇到这个错误

<unknown>:0: error: merge-module command failed with exit code 1 (use -v to see invocation)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
:0:错误:合并模块命令失败,退出代码为1(使用-v查看调用)
命令/Applications/Xcode.app/Contents/Developer/toolschains/xcodefault.xctoolschain/usr/bin/swiftc失败,退出代码为1

我已经尝试了所有我能找到的关于如何解决这个问题的方法,但是没有任何效果。我已经将我的优化级别切换到None[-Onone],我已经执行了清理,并且在终端中运行了xcodebuild函数,但是没有任何效果。关于如何解决这个问题有什么想法吗?

我也有同样的问题。我在使用迦太基,最终发现,出于某种原因,我用sudo运行了
Carthage update
,这改变了编译框架的权限。我通过运行以下命令修复了这个问题

brew升级迦太基
sudo rm-右前迦太基/
迦太基更新

然后清理xcode项目并重新构建


希望能有所帮助。

在我的例子中,实际的错误被描述得更深入了


这是一个无法找到的头文件,因为我没有在我的目标
构建设置中设置
头搜索路径

迦太基?我没有运行那个或任何外部的。我唯一运行的是GameKit。正如你所建议的,这个问题与框架有关。在我删除并重新添加GameKit之后,我的代码开始完美工作。谢谢。看起来我们有相同的问题,但原因不同。我会留下答案,以防它对使用迦太基的其他人有所帮助。这个答案对我帮助很大,因为我的问题与权限错误有关。不完全相同,但症状和解决方法相同。非常感谢您抽出时间与我分享。对我来说,答案是“忽略您在文件系统上看到的权限和所有权,并删除我在Mac上使用的这个新用户的所有迦太基输出目录”。