Oh well … the usual cocos2d upgrade troubles.
Oh well … the usual cocos2d upgrade troubles. Personally I would simply install the cocos2d 1.1 templates (assuming they're up to date) and create a project based on one of the cocos2d templates. Then add your source code and resources to this newly created project.
This usually works a lot better than trying to replace and update the cocos2d code in an existing project. I guess that your problem may be coming from removing the cocos2d project but not the files from your hard drive. That means there can still be some left-over files from the old version that are still included in the project and built.
You definitely want to delete all existing cocos2d files before moving the new cocos2d files in place. Finally, don't rule out the possibility that the version you downloaded from github is broken. It wouldn't be the first time.
Try using the downloadable version from the website instead, and keep in mind that 1.1 is just a beta at this point in time. Tip: in future you may want to create cocos2d projects with Kobold2D, it has an upgrade tool that does away with all those troubles.
Sounds good! I did download it from the website, and if I try the batchnode in a new template it does work. Will try your suggestions for upgrading :) – Erik Dolor Nov 1 at 18:29.
There is no need to import cocos2d. H in your . M file if you have imported it in your .
H file. I don't think that's the problem, though. There are two possibilities: CCParticleBatchNode is defined in cocos2d.
H, in which case you don't need a forward declaration and this may be confusing the compiler. CCParticleBatchNode is not defined in cocos2d. H, in which case you need to import CCParticleBatchNode.
H in your implementation file as all you have is the forward declaration.
... And if I look in the 'cocos2d. H' file, I do see an import for CCParticleBatchNode.h. I do vaguely remember having a problem like this before, but I can't remember what solved the problem then :( – Erik Dolor Nov 1 at 13:21 Which line is currently giving you the error?
– jrturton Nov 1 at 13:40 Several lines. A semantic issue 'unknown type name' in the header file (removed the @class line) and the same error in the implementation when trying to init it, and a ARC issue because the class method is unknown. – Erik Dolor Nov 1 at 13:58 You may not be able to use ARC, I don't know if cocos2d has been updated to support this but I doubt it.
– jrturton Nov 1 at 14:05 I doubt it, but I believe I had set it to not use ARC. As long as the compiler knows that, however, I believe the warning will go away. – Erik Dolor Nov 1 at 14:07.
Removing the cocos2d project inside my project and re-adding it. " Check that the files are part of the build process. In XCode 4, click the project name in the top of the Project Navigator, select "Build Phases," make sure "cocos2d libraries" is shown under the target name.
If it is, then expand "Target Dependencies," and make sure it's also listed there. Then expand "Link binary with Libraries" and make sure it's also added there.
Cocos2d(cocos2d-ios)' is added under 'Target Dependencies', and 'libcocos2d. A' is added under 'Link Binary With Libraries'. – Erik Dolor Nov 1 at 13:23 Under Cocos2d libraries (in Build Phases), 'Copy Headers,' is the CCParticleBatchNode.
H file there? If so, ensure the m file is also included under 'compile sources. ' – Javy Nov 1 at 13:33 Yep, those are both there too.
This is really weird :S Been up way too late to try and fix this problem as we recently sent in our app to Apple and the new cocos2d should fix some problems we had... – Erik Dolor Nov 1 at 13:52 One last check, is the Cocos2d. M & m files also where I asked you to check in the last comment? Are there any other Cocos elements in your project (CCSprite, etc)?
No problems from them? You should also remove "@class CCParticleBatchNode;" it's redundant. – Javy Nov 1 at 13:59 The @class has been removed.
I'm not getting any errors from the other cocos2d elements and they worked before. And yes, the cocos2d. H/m files are in there too.
– Erik Dolor Nov 1 at 14:02.
I had the same problem when downloading the newest templates. The problem was that even though the files CCParticleBatchNode. H and CCParticleBatchNode.
M were present physically, they had not been added to the Xcode project template. I just had to add them to the project and then it compiled.
Hmm, let's try that. Hopefully that's the problem.... Did you add it to the cocos2d project or your project itself? – Erik Dolor Nov 2 at 17:14 My cocos2d is in a folder called libs, so I did libs -> cocos2d -> (right click) -> "Add Files to ..." -> find the files and add them.
If it lets you select and add those two files, it means they're not in your project, and adding them might be all you need to do. If they're greyed out, then they're already in your project and the problem is probably elsewhere. – Danyal Aytekin Nov 3 at 11:38 I somehow managed to fix it.
But I have cocos2d added as a project, not a lib folder, because that was the only relatively easy way to turn off ARC for all of cocos2d. – Erik Dolor Nov 3 at 17:33.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.