Cocos2d-x Easy Setup to Run Android Games on Windows with Eclipse

I recently started with cpp programming for Android games and found that my Hackintosh is too slow since the graphics memory allotted by the OS is just 128MB , dont know why.

Hence I could not work on cpp stuff on Mac, but still my Windows OS is running fine.

So I tried setting up Cocos2d-x on Windows with eclipse and followed upto the end all the instructions and got stuck on one error

”bash’ program not found in path.

Ok Here is what to do to setup completely cpp programming with cocos2d-x on eclipse in WIndows machine.

1. Open Computer Advanced Properties.

2. Add NDK path, cygwin\bin path, java\bin path to the System Path variable settings

3.  Open Eclipse->Preferences->C/C++->Build->**Environment**.

Click **Add** button and add a new variable  NDK_ROOT` pointing to the root NDK directory.

Add new variables  CYGWIN   with value  nodosfilewarning  and   SHELLOPTS  with value  igncr 

4. Eclipse->Preferences->General->Workspace->**Linked Resources**
Click **New** button to add a Path Variable  COCOS2DX pointing to the root cocos2d-x directory.

5. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file.

 

Well the content from the Readme.MD gives it all, but normally developers tend to omit reading as we overlook or jump into things fast.

 

Leave a Reply