简体   繁体   English

xcode中的错误:clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

[英]error in xcode : clang: error: linker command failed with exit code 1 (use -v to see invocation)

getting the following error. 得到以下错误。 i did have duplicate names for a var but i have now changed these and the error is still there how can I fix this? 我确实有一个var的重复名称,但是我现在更改了这些名称,错误仍然存​​在,我该如何解决?

duplicate symbol _main in:
    /Users/James/Library/Developer/Xcode/DerivedData/project2_18094969-dbsiivorqvjflcejayyqrobtrdwt/Build/Intermediates/project2_18094969.build/Debug-iphonesimulator/project2_18094969.build/Objects-normal/x86_64/main.o
    /Users/James/Library/Developer/Xcode/DerivedData/project2_18094969-dbsiivorqvjflcejayyqrobtrdwt/Build/Intermediates/project2_18094969.build/Debug-iphonesimulator/project2_18094969.build/Objects-normal/x86_64/AppDelegate.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如果您已经删除了代码中的重复项,请清理您的xcode项目并尝试再次构建。

Please check whether you have deleted the names which has been already connected to outlet. 请检查您是否删除了已经连接到插座的名称。 If so, remove the outlet. 如果是这样,请卸下电源插座。 This scenario will throw linker error. 这种情况下将引发链接器错误。 I had experienced these type of error. 我遇到了这类错误。

That error may contains many different errors not only on your code. 该错误可能不仅在您的代码上包含许多其他错误。 Some times on your files. 有时会在您的文件上。 Try to check the files in your project(if deleted that is in the code), or check the upper part of the error because it'll give the source of error. 尝试检查项目中的文件(如果删除了代码中的文件),或者检查错误的上部,因为它将提供错误的来源。

> but i have now changed these and the error is still there how can I fix this?

Trash your derived data and do a clean build, this will solve the issue. 破坏您的派生数据并进行干净构建,这将解决问题。 Path : ~/Library/Developer/Xcode/DerivedData 路径 :〜/ Library / Developer / Xcode / DerivedData

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xcode 5- clang:错误:链接器命令失败,退出代码为1(使用-v查看调用) - Xcode 5- clang: error: linker command failed with exit code 1 (use -v to see invocation) 修复-Xcode 9.1-铛:错误:链接器命令失败,退出代码为1(使用-v查看调用) - Fix - Xcode 9.1 - clang: error: linker command failed with exit code 1 (use -v to see invocation) clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)Xcode 9 - clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 9 clang:错误:在xcode上进行单元测试时,链接器命令失败,退出代码为1(使用-v查看调用) - clang: error: linker command failed with exit code 1 (use -v to see invocation) when doing unit test on xcode 铛:错误:链接器命令失败,在xcode 6中退出代码为1(使用-v查看调用) - clang: error: linker command failed with exit code 1 (use -v to see invocation) in xcode 6 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)Xcode 10.2.1 - clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 10.2.1 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)Xcode - clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode Xcode 5 - clang:错误:链接器命令失败,退出代码为1(使用-v查看调用) - Xcode 5 - clang: error: linker command failed with exit code 1 (use -v to see invocation) clang:错误:Xcode 10.0和Ionic 3中的链接器命令失败,退出代码为1(使用-v查看调用) - clang: error: linker command failed with exit code 1 (use -v to see invocation) in Xcode 10.0 and Ionic 3 叮当:错误:链接器命令失败,退出代码为1(使用-v查看调用)Xcode 10,Xcode 10.1 Beta,Swift 4.2 - Clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 10, Xcode 10.1 Beta, Swift 4.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM