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
It appeared that in my case I was importing a .m file instead of its .h counterpart. Solved by editing
#import "Tools.m"
into
#import "Tools.h"
In my case, I declared an NSString in my constants file (imported by many classes) but forgot to define it as static!!
e.g. NSString* PARAMS = @"paramA";
should be: static NSString* PARAMS = @"paramA";
Reading the full error message allowed me to figure this out: "Duplicate symbol PARAMS". Don't be afraid and try to understand error messages! Sometimes they might even tell you exactly what you did wrong.
I had the same problem opening a project, that was created with Xcode 4.0.2, with Xcode 4.1. I simply solved by clicking on "Modernize Project" (Editor/Modernize Project). This procedure automatically removed all duplicates.
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.