[英]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.