01-25-2012 05:13 AM
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 :
Under QCC Linker->Libraries Library Paths(-L) box :
And in Libraries(-l) box in the same tab add :
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
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
This will ensure everything it set up correctly. Let me know if you experience any further issues.
01-26-2012 11:53 AM
01-26-2012 11:56 AM
your solution works perfect on NDK 1.0 but on NDK 2.0 build is ok but run as fails with "
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.
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:
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.