user1539463
user1539463

Reputation: 11

error: linker command failed: ld: duplicate symbol _main

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"

Upvotes: 1

Views: 3842

Answers (1)

fannheyward
fannheyward

Reputation: 19277

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

Upvotes: 3

Related Questions