Hello From India !!

Look at samples/Cpp/TestCpp/proj.win32, it contains project file for visual studio. Each proj.* contains project or buildsystem file for one operating system.

Sorry but there is no Samples folder in there (cocos2dx 2.0.1)…

Also proj.* needs visual studio…and when i had build earlier vcproj it had many build errors

You can download latest cocos2dx, Box2D integration scheme probably is the same with 2.0.1. If you have build errors in visual studio, try XCode on Mac OS X or Eclipse on Linux (with compiling makefile): both enviroments are well-tested.

P.S. On linux you can also open it in QtCreator with project creation wizard: “ImportProject”->“Import Existing Project”. Than build with Ctrl+B. QtCreator is much easier in use.

okay as i had already installed linux mint , i need to have cocos2dx 2.0.4 (in 2.0.1 there was a bug with CCPlatform with linux/OSX).

There i am having ‘make-all-linux’ script.But i dont know how and when to use it ?

Procedure i am following on linux :

  1. create-android-project.sh

  2. ./build_native.sh

  3. import into eclipse (add c*+ nature,syntax checking removal ,etc)
    In 3rd,i am going to C*+ build section in eclipse and using this command :
    bash ${workspace_loc:/)/build_native.sh NDK_DEBUG=1 V=1

Now where to use that ‘make-all-linux’ script ?

Ram Mehta I do not know what version of visual studio and cocos2d-x you tried, but in my case it was like that:

  1. download and install visual studio express c++ 2010
  2. download and unpack cocos2d-x v2.0.4
  3. run build-win32.bat and everything compiled without any errors

So if you created android project, you don’t need in make-all-linux script. Just build from eclipse and run on android emulator or device. If you want run it on emulator, create device with API level >= 8 and check flag “Use host GPU”.

You can import existing androiud project from “${COCOS_SOURCES}/samples/Cpp/TestCpp/proj.android”.

`Leszek S : visual studio express c++ ?? u mean to say visual studio express or visual c++ express ?? i have visual studio express 2010.
Also one curious question if i use visual studio/C++ express ,how can i test my game on emulator/device ??

`Sergey Shambir : okay .thanks for that.but it still doesn’t answer my question of using eclipse for box2d.

Sorry, I mean visual c*+ express 2010 . Sadly there is probably no emulator for VS but for most things you can just build a native windows app and test it without emulator or device and I think that using visual studio/visual c*+ is the easiest/fastest way to start programming with cocos2d-x on windows. Later you can move your code from vs to eclipse or xcode if you need this.

Ram Mehta wrote:

@Sergey Shambir : okay .thanks for that.but it still doesn’t answer my question of using eclipse for box2d.
You can just copy any project from Samples directory (HelloCpp is simplier that others) and start modidying it for your needs. You can find Box2D usage example in TestCpp sample project.

Since all sample projects have proj.android subdir, you can use following workflow:
# Open TestCpp/proj.android in Eclipse, run it and just enjoy working Box2D, play a bit with sample;
# Copy HelloCpp and open proj.android of copied project in Eclipse;
# Modify copied project, use TestCpp Box2D test as example.

You might want to go through this tutorial …

http://gameit.ro/2011/08/creating-a-cocos2d-x-box2d-android-project/

:slight_smile:

This post was flagged by the community and is temporarily hidden.