Xcode, Duplicate symbol _main


I have duplicate symbol _main.

The problem is it says "Duplicate symbol _main in /Users/…/i386/main-B9843B6026D6EFA4.o and /Users/…/i386/main-B9843B6026D6EFA4.o", the XXX and XXX are actually the same .o file. I don't know why it thinks it's duplicate symbol when it's the same .o?!

Any help appreciated, thanks.

Best Solution

Ah..I figure out it's that I have multiple entries under Targets/Compiled Sources ( in newer XCode it's under Build Phases/Compile Sources ). I removed them and the problem is solved. The multiple entry thing probably has to do with Git merge.