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

Reply
Contributor
Posts: 12
Registered: ‎02-28-2013
My Device: BB10
My Carrier: att

More BelligerentBlocks and Box2D build problems

I've read all the threads on this topic already and none of the solutions seem to be working. I feel super dumb. Here are the steps I've taken:

1) Import->General->Existing Projects into Workspace, then navigate to BelligerentBlocks and import it

2) Import->General->Existing Projects into Workspace, then navigate to Box2d-master and import the Box2D project (not hello world or the other project within master)

3) CTL+Shift+L -> Library project in the workspace -> Select all of Box2D and subfolders

 

After this I'm still getting "fatal error: Box2D/Box2D.h: No such file or directory

 

I must be missing something obvious but I've been fighting this for hours and would appreciate some help.

 

Here's a screenshot of what it looks like now:

http://img32.imageshack.us/img32/558/box2derror.png

Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

Contributor
Posts: 21
Registered: ‎04-12-2013
My Device: BlackBerry Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

[ Edited ]

I am having this exact issue also. I built Box2D, built Hello World, ran Hello World on my device. However, all attempts to link or add libBox2D.a in BelligerentBlocks project settings, move around source folders, etc. all result in the same error:

..\src\/GameLogic.h:31:25: fatal error: Box2D/Box2D.h: No such file or directory

I wish BlackBerry would just post a tutorial on exact steps required to properly link and compile their own tutorials. What a headache.

Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

[ Edited ]

Did you add the folder which Box2D is under into the include folder list area?

 

--Edit--

One thing you can also check is the Project References.  You mentioned that you compiled Box2D, then you should have it in your workspace... Open up the Belligerent Blocks Properties page and go to Project References.. Be sure Box2D is selected...

Contributor
Posts: 21
Registered: ‎04-12-2013
My Device: BlackBerry Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

>Did you add the folder which Box2D is under into the include folder list area?
How do I check this? I notice by default the BelligerentBlocks includes has a lower case "box2d" in the list. I added the compiled (uppercase) Box2D to the includes list via Ctrl+Shift+L. Is that what you mean?

 

 

>Open up the Belligerent Blocks Properties page and go to Project References.. Be sure Box2D is selected...

 

It was not selected, but now it is. But it still won't build. Same error as before

 

 

Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

Same area... Go to the Belligerent Blocks Properties area and...

1) Expand C/C++ General

2) Paths and Symbols

3) On the right side make sure the Includes tab is selected and highlight GNU C

4) On the right hand side you should see buttons for Add, Edit, Delete... etc Select Add...

5) A little window will open up.. Select File system...and look for the directory/folder that Box2D is in...

 

Example:

 

E:\BlackBerry\ndk-10.0.9-workspace\Box2D\Box2D.h

-------------------------------------------------

E:\BlackBerry\ndk-10.0.9-workspace would be the directory...

Contributor
Posts: 21
Registered: ‎04-12-2013
My Device: BlackBerry Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems


jalue wrote:

Same area... Go to the Belligerent Blocks Properties area and...

1) Expand C/C++ General

2) Paths and Symbols

3) On the right side make sure the Includes tab is selected and highlight GNU C

4) On the right hand side you should see buttons for Add, Edit, Delete... etc Select Add...

5) A little window will open up.. Select File system...and look for the directory/folder that Box2D is in...

 

Example:

 

E:\BlackBerry\ndk-10.0.9-workspace\Box2D\Box2D.h

-------------------------------------------------

E:\BlackBerry\ndk-10.0.9-workspace would be the directory...


 

Excellent that worked.

 

So for other readers who stumble across this, here are the steps I followed:

 

  1. Import Box2D and HelloWorld
  2. Built Box2D, Build HelloWorld
  3. (I ran HelloWorld just for sanity, not required)
  4. Import BelligerentBlocks
  5. Build (it will give error about not knowing where Box2D.h is)
  6. Click on BelligerentBlocks Project, press Ctrl+Shift+L, select "Library project in the workspace", then Select ALL Box2D folders (with Select All button)
  7. Right-Click on BelligerentBlocks
  8. Follow the steps above from jalue 
  9. Build BelligerentBlocks

 

It works! Hooray. Smiley Happy

Visitor
Posts: 1
Registered: ‎05-24-2013
My Device: q10
My Carrier: -

Re: More BelligerentBlocks and Box2D build problems

Hi brendonsmall

 

I've followed your step, but I'm still encountered the same issue,

the "Box2D" is appear on the Includes section but nothing inside, 

 

Im so desperate to solve this issue, please help me. :'(

Contributor
Posts: 21
Registered: ‎04-12-2013
My Device: BlackBerry Z10
My Carrier: Rogers

Re: More BelligerentBlocks and Box2D build problems

It might be worth trying on a fresh version from github. Delete the projects from the SDK and your hard drive, then re-import and try again? That's what I did when these steps worked for me.