Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

How to correct add Box2D to blackberry project using cocos2d-x

Hi,

I use the cocos2d-x framework,
I have a game that runs fine on android and iOS, but when I try to  create the project inside QNX Momentics, It tell that can't find box2d.h, how is the correct way to add box2d to a blackberry project in cocos2d-x?

Developer
Posts: 107
Registered: ‎02-15-2012
My Device: Blackberry Playbook 32GB
My Carrier: Virgin Mobile

Re: How to correct add Box2D to blackberry project using cocos2d-x

Take a look here and you'll find box2d. Could try and compare your project to the box2d files on the github.

Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

Re: How to correct add Box2D to blackberry project using cocos2d-x

I succesfully add the box2d file

 

Previous I use

#include "Box2d.h"

But it not work

 

now I use the 

#include "Box2D/Box2d.h"

 

and works, but I still have an error:


../../../../external/Box2D/proj.blackberry/Device-Debug/libBox2D.a: No such file: No such file or directory Bricks C/C++ Problem

 

any idea of how to resolve that?

New Contributor
Posts: 8
Registered: ‎06-08-2011
My Device: Playbook & Dev Alpha B
My Carrier: 3

Re: How to correct add Box2D to blackberry project using cocos2d-x

I don't have Momentics in front of me, so this is all from memory, but you generally want to make sure that you've built the Box2D project in Momentics, which will produce the library file libBox2D.a in the Device-Debug directory. Then make sure your Bricks project references the library file. Right click on the Bricks project, select Properties, expand the C++ item and find the linker input settings. Add a file from your workspace and then select libBox2D.a from your Box2D project in the Device-Debug folder.
Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

Re: How to correct add Box2D to blackberry project using cocos2d-x

Unfortunately I think it's a bug from Momentics, because I already have the libBox2D.a file in the respective Device-Debug folder, but when I try to compile, Momentics can't find the file.

I'll try to add the file like you said, I'll post the result here, thanks

Highlighted
Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

Re: How to correct add Box2D to blackberry project using cocos2d-x

ThomasRiisbjerg, I can't find the 'linker' option that you said.

I open the properties, but i find two C++ options:

C/C++ Build and C/C++ General,

But no one of them have the linker option inside it.

Can you help me?

New Contributor
Posts: 8
Registered: ‎06-08-2011
My Device: Playbook & Dev Alpha B
My Carrier: 3

Re: How to correct add Box2D to blackberry project using cocos2d-x

Project properties -> C/C++ Build -> Settings -> QCC Linker

Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

Re: How to correct add Box2D to blackberry project using cocos2d-x

I found it, thank you very much

New Contributor
Posts: 8
Registered: ‎06-08-2011
My Device: Playbook & Dev Alpha B
My Carrier: 3

Re: How to correct add Box2D to blackberry project using cocos2d-x

Did that solve your linker error?

Contributor
Posts: 33
Registered: ‎11-21-2012
My Device: Blackberry Playbook
My Carrier: TIM Brasil

Re: How to correct add Box2D to blackberry project using cocos2d-x

Yes, it resolved, thanks.