1
votes

clang: error: linker command failed with exit code 1 (use -v to see invocation)

It says that i have:

ld: duplicate symbol _main in /Users/timpark/Library/Developer/Xcode/DerivedData/tutorial- gsmmwsvdohwbiqforobplztheaso/Build/Intermediates/tutorial.build/Debug/tutorial.build/Objects-normal/x86_64/tutorial.o and /Users/timpark/Library/Developer/Xcode/DerivedData/tutorial-gsmmwsvdohwbiqforobplztheaso/Build/Intermediates/tutorial.build/Debug/tutorial.build/Objects-normal/x86_64/main.o for architecture x86_64"

1

1 Answers

3
votes

duplicate symbol _main means you have multiple main.m under Targets/Compiled Sources. Check out and remove it.