How to import Box2d in HelloWorld Project ?

How to import Box2d in HelloWorld Project ?
0.0 0


I am posting this for the third time please-please-please-help

i have looked this[1] link and it describes how to use it but fails at where to implement the code i.e. do we need to include some other files for box2d or cocos2dx will take care of it ?

Mates one good basic walk-through explaining how to set-up box2d for c++ with eclipse.
[i am asking how to import the box2d functionality in my HelloWorld project,what are the steps needed]

NOTE: i know how to use box2d but how to implement it in the default cococs2dx HelloWorld project ?

[ i am on windows7 64 bit,ndk r8b,cocos2dx 2.0.1 and with eclipse 3.7 ]



If you are on a mac you can create a hello world box2d project in an xcode ,but if you are on a windows machine,no it is not supported by the template written.

So better you can copy that code from cocos2d-x tests.

For eclipse you then have to use cygwin and give a native compilation.

Good luck.


thanks first for replying me…

next i am on windows and have made a basic mole-whacking games using raywenderlich’s sites tutorials…

i know how to create a basic HelloWorld game on windows using cocos2dx…
(create project using windows shell->use cygwin bash (./build_native)>import into eclipse>add c/c++ nature etc)…

Now i want to add physics nature to my game using box2d so what will be the changes i need to make to my HelloWorld project ?
(i.e. how can i add box2d to my project ? )


What version of cocos2d-x are u using? For win32 project, you can install the templates and then it gives you the option of adding Box2d at the start.


i am using cocos2d-2.0-rc2-x-2.0.1 on win7 64-bit…android ndk r8b…

and i dont have visual C++ (dont know why but i hate ms-products except windows7)…

i am developing on eclipse 3.7…

do we need to import something into HelloWorld.h file and make some changes in the file ??
[ i am n00b at setting box2d please explain any more changes if there are any, other than these ]