Setting up cocos2d-x with Eclipse and Visual Studio on Windows

Getting started with cocos2d-x can be tough. There’s too much information on the internet that may or may not work for you.
Unfortunately, there isn’t a perfect tutorial that will help you get started, so you may have to mix and match accordingly.
I have been asked about setting up cocos2d-x many times before and this is the collection of resources that I usually point them to –

A very good tutorial to setup cocos2d-x on windows and eclipse here-

http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started

http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game

The official cocos2d-x wiki –
http://www.cocos2d-x.org/projects/cocos2d-x/wiki

More Help here –
http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html
–For CDT part you can also try OpenCV’s help http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html#android-dev-intro

———————
For setting up in Visual Studio
http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
———————————

Other notes while setting up cocos2d-x on windows with eclipse:

Always run cmd and cygwin with administer privileges.
1] Unzip ndk and add to “path” variables
2] Install Cygwin and select “make” for sure among the utilities that you install
3] Run “create-android-project.bat” in cmd.exe . If it gives error in location of sdk or ndk, then edit the .bat file and change location in there.
4] After creating the project, run the ‘build native.sh’ script using the command
sh build_native.sh
5] If you get permission denied error for any file, then manually select the file and change its permission to Full Control for Everyone. (Alternative run following command in the target folder “chmod 777 -R * “)
6] When you import the project in eclipse then also add the ‘cocos 2d sdk’ library project
7] If you get error while running the project and it points to some file in assets then change permission for that file. or Type this in command line – chmod 777 -R *

Leave a comment