01-25-2012 05:13 AM
Hi,
anybody can explain how comes if I am including all box2D libraries I get undefined references for example for b2World but not for b2Vec2 or b2BodyDef as shown on screenshot?
Solved! Go to Solution.
01-26-2012 10:50 AM
So, you have box2d headers but you dont link box2d library to you project. There are a couple of things you need to do to make this work properly.
Go to your Properties->Project References tab. Add box2d as a reference, this will cause box2d to be built before your project is built.
Then go to Properties->C/C++ Build->Settings tab.
Under QCC Compiler->Preprocessor add :
"${workspace_loc:/box2d}"
Under QCC Linker->Libraries Library Paths(-L) box :
"${workspace_loc:/box2d/Device-Debug}"
"${workspace_loc:/box2d/arm/a-le-v7}"
And in Libraries(-l) box in the same tab add :
box2d
This should do the trick. And take a look at BelligerentBlocks sample on the github. It is a C++ project that uses box2d.
01-26-2012 11:13 AM
Hi,
Not sure what in the environment may be causing this but try the following:
1) import the Box2D project to your workspace and build (looks like you've already done this)
2) Import the HelloWorld sample directly from the Box2D project
a) File > Import > General > Existing Projects Into Workspace
b) In the file explorer browse to the HelloWorld folder within the Box2D project and import
c) Build
This will ensure everything it set up correctly. Let me know if you experience any further issues.
Cheers,
01-26-2012 11:53 AM
01-26-2012 11:56 AM
Hi Garett,
your solution works perfect on NDK 1.0 but on NDK 2.0 build is ok but run as fails with "
Packaging failed:1
Error: File or dir does not exist: C:\bbndk-2.0.0-beta3\target\target-override\armle-
I am trying to add "C:\bbndk-2.0.0-beta3\target\qnx6\armle-v7\usr\lib
I keep trying.
Thanks
01-26-2012 12:01 PM
Problem here is that you have a bar-descriptor tries to package libbps with the app. Go to your bar-descriptor.xml and remove this line:
<asset
path="${QNX_TARGET}\..\target-override\armle-v7\usr\lib
You dont need to do this in NDK2.0. Also, there is a 2.0 branch of samples on github.
01-26-2012 12:02 PM - edited 01-26-2012 12:14 PM
Update: The above post dtomilovskiy explains this correctly, you can just remove reference to the libbps.so from the bar-descriptor file.
Regards,