I am trying to run my cocos2d application and facing this error, as I have recently upgraded my sdk to 4.2 and my cocos2d to 0.99.5.
I tried to clean my project even
You are linking the file MenuScene.m twice. You apparently have it in a static library and also in your main application.
Another rather simple thing to check is that you did not accidentally #import
a .m
file instead of a .h
header file.
Happened to me.
I have also had this particular error occur when a file that has not been added to the project, is referenced somewhere in the project. The two cases where I have experienced this are where I have deleted/removed files from the project without removing references to them, and when working cooperatively on a project where a teammate added the reference but I have not added the file to my version of the project.
I know the OP has resolved their problem, but I felt this might help someone else who reads this question while looking for help.
Another possibility for error like this is when there is a class name collision. Either 2 classes with the same name within your project, or class from your project clashing with one defined in some of dependency libraries.
Remove target from right panel and again add target. This will remove any duplicate references. It may happen if 2 programmer add the same target and commit the project file.
In my case I was using a binary library includes the same class name I was using outside, So I changed my class name and It's working fine :)