I got this error when I press build+debug:
ld: duplicate symbol .objc_class_name_BlogTableItemCell in /Users/fabian/Development/Workspaces/iphone_experiments
Adding another possible cause to the list... you may have mistakingly created multiple constants in the implementation file, but outside of the implementation, with the same name.
In HeaderFileOne.m
NSString * const kCoolConstant = @"cool";
In HeaderFileTwo.m
NSString * const kCoolConstant = @"cool";
So changing one of those constant names would fix the compile error.
The same thing happened to me while I was playing with localizable xib files, accidentally I have created two implementation files and appereantly that caused the problem in my case. After deleting / recreating the implementation file without doing the same mistake, the error was fixed.
I had a similar problem due to poor defining of consts. I had defined a const in my header:
int const kCropLocationTop = 1;
This was presumably imported multiple times. To fix i changed the header def as follows:
extern int const kCropLocationTop;
and moved the assigning of the const to the .m file:
int const kCropLocationTop = 1;
Hope that helps anyone who's as ignorant of simple objective c concepts as I am!
I also faced to this problem. My solution was rename one of global variable, which has the same name as one in other class. Hope this helps
You could also get this error if you mistakenly let Xcode's auto-complete for #import statements specify the '.m" file for the 'duplicate' class instead of the '.h'.
It happened to me, too. In my case, one (just one) of my core data automatically generated classes was inserted twice. I spotted the duplication by looking at Build Phases...Compile Sources. Simply deleting one of the occurrences solved the problem.