0

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?

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)
james.d_12
  • 57
  • 8

4 Answers4

0

Clean your xcode project and try to build again, if you have already removed duplicacy in code.

vikingosegundo
  • 52,040
  • 14
  • 137
  • 178
0

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.

0

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.

Gabriel M.
  • 90
  • 5
0
> 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

Joe
  • 3,774
  • 1
  • 17
  • 25