2

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 cocos2d-x-2.1.4.zip
  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.

Rafal

Rafal Cypcer
  • 557
  • 1
  • 5
  • 17
  • Do the sample apps (HelloCpp etc) compile and run successfully? – donturner Jul 08 '13 at 21:14
  • I have exact same problem, maybe your problem is that you must uncheck the "Copy projects to workspace" option, in that should compile, but for me still failed... I don't know what to do, the newest version of cocos2d-x seems to be not working well with the new QNX Momentics IDE. I tested with the BB NDK 10 and the one for tablet OS BB NSK 2.1, both unsuccessfully... if you manage to solve the problem, please post an answer – nosmirck Jul 13 '13 at 01:09
  • @donturner - yes, samples in cocos2d-x for BlackBerry works fine, but problem is to create a new project from scratch and reference to all libraries I listed above. – Rafal Cypcer Jul 19 '13 at 08:39
  • @nosmirck - still not working. I tried also compile BBTemplateProject but I got errors with undefined references in decode.h (WebPGetFeaturesInternal, WebPInitDecoderConfigInternal). – Rafal Cypcer Jul 19 '13 at 09:01
  • I found something releted to this problem: http://denvycom.com/blog/setting-up-cocos2d-for-blackberry-10-development/ – Rafal Cypcer Jul 19 '13 at 09:04

1 Answers1

1

Hi Rafal and nosmirck,

I wrote the post on denvycom (http://denvycom.com/blog/setting-up-cocos2d-for-blackberry-10-development/) about setting up Cocos2dx for Blackberry. Basically, I imagine the WebPInitDecoder error is as a result of a missing or unreferenced code file were it has been defined. Like I mentioned in the post, commenting out these files made the BBTemplateProject build successfully and run on my BBz10. Thus far, I have had no trouble using the BBTemplateProject (with the commented files) as a base for my preliminary projects .

Did commenting the files out solve your compile errors ?

Vykthur D .
  • 351
  • 2
  • 7
  • 1
    Thanks, this helped, although it is not a real solution for the problem because we should be able to link the missing libraries, but I think they are not really needed and commenting the callbacks is a simple solution. Thanks! – nosmirck Jul 23 '13 at 16:38
  • Thanks. I have run into another Cocos2d Blackberry 10 related problem ... happy to have your thoughts and help on the matter .. http://stackoverflow.com/questions/17878599/how-to-import-and-use-qobject-in-a-bb10-cocos2d-based-app Thanks – Vykthur D . Jul 26 '13 at 10:10