How to add cocos2d-x to BlackBerry 10 project?

How to add cocos2d-x to BlackBerry 10 project?
0.0 0


I want to create a simple game for BlackBerry 10 and I want to use cocos2d-x as a game engine. I compiled and ran examples from cosos-2d-x on simulator and it works fine. But problem is when I create new project and reference to cocos2d-x project. During building new project linker couldn’t find some header files. How to set up cocos2d-x to Blackberry 10 project?

How I did it so far?

  1. Unzipped
  2. In QNX Momentics IDE I chose File~~>Import~~>General->Existing Projects into Workspace
  3. In Import window I selected root directory (where I unzipped cocos2d-x) and selected Box2D, chipmunk, cocos2dx, CocosDenshion, extensions, HelloCpp, SimpleGame, TestCpp (all for Blackberry) and pressed Finish button. I didn’t change default options in Import window.
  4. I created New BlackBerry Project and in Properties of new project in Project References I selected Box2D, chipmunk, cocos2dx, CocosDenshion and extensions.
  5. To new project I pasted code from HelloCpp for bulid test.

After that I received build errors. Should I set up Path and Symbols in Properties of project?

Thanks for the reply.



There are a whole bunch of settings which need to be defined for the project to work - it took me ages to find them all. The easiest way is to copy one of the sample projects and change the values to your needs. I wouldn’t try to build the project from scratch as it’s very easy to miss something which is required.



Indeed, modifying sample is the best way to avoid of loosing many hours to set up properly dependencies of “project from scratch”. As you said there are bunch of settings and I thought that someone could give me a clues how to do it from scratch.

Anyway thanks for reply :wink:



Generally I’ve found that the bulk of the work is done by setting the appropriate references in Project Settings~~>C/C++ General~~>Paths and Symbols. Make sure every tab on that page (and every configuration!) has values which match the samples. Top tip: always set the configuration drop-down to “All configurations” before you change anything, otherwise you’ll end up with fragmented settings all over the place. You can also manually edit the .project and .cproject files in a text editor if you find it easier (I did).