1

I want to add cocos2d to an existing project.

I found this: Adding Cocos2D only to already existing project?

which looks like exactly what I want.. however, I downloaded cocos2d from the website and I don't have a FontLabel folder or file..? whatever it's supposed to be.

I followed the rest of the instructions and I keep getting errors where it says cannot find: kazmath/SOME_FILE.h so I imported the kazmath directory into the project as well, but the same error kept persisting.

So here are my questions:

  1. Is there a better/easier way to link cocos2d with an existing project?
  2. Why does it keep looking for the kazmath files even though they're there? (I cleaned and rebuilt the project many times).
  3. Where can I get this FontLabel and is it important that I have it?
Community
  • 1
  • 1
corgichu
  • 2,580
  • 3
  • 32
  • 46
  • Did you link the linker flags? Step 5. That generally create the error. Font label folder is the file that works with placing labels on the screen such as score etc. – Adrian P May 22 '13 at 02:33
  • @CodeMonkey yes, I did the linker flags. Although I'm not sure what -lz flag is? I just copied it. – corgichu May 22 '13 at 04:57
  • add kazmath to search path. The question refers to cocos2d 1.x hence the discrepancies – CodeSmile May 22 '13 at 09:16
  • Is that done by added `"$(SRCROOT)/kazmath"` to the Library Search Paths under Build Settings? If so.. it's not working still. – corgichu May 22 '13 at 17:26
  • HEADER search path, not library – CodeSmile May 22 '13 at 18:43
  • I add `"$(SRCROOT)/kazmath"` to the Header Search Path and took it out of the Library Search Path and it still doesn't work. I get a `Lexical or Preprocessor Issue 'kazmath/mat4.h' file not found` although those files are there. – corgichu May 22 '13 at 18:48
  • hi,@cskoala I am getting the same issue. do you have solution for that? – Chitra Khatri Feb 26 '14 at 09:30

0 Answers0