Linux Environment Setup
Linux development can be done either with Eclipse (and its managed make system) or with regular Makefiles. This pages describes the Makefile approach.
The Linux build of cocos2dx is mostly used unser Debian/Ubuntu-based systems. Use on other distributions will probably work fine but YMMV.
To build cocos2dx you need the following packages intalled:
The top level script "make-all-linux-project.sh" will check for these and attempt to install them for you.
Building
make-all-linux-project.sh will then do a clean build of all projects in both Debug and Release configuration. To build just one configurations you can just use 'make'. e.g.:
This will build all cocos2dx libraries and examples in debug mode. Libraries are build into the 'lib/linux/Debug' folder.
If you just want to build a single library or a single example just run 'make' from the proj.linux folder for that library or example. e.g:
Remember to add the -j argument when you run make to dramatically speed up your build time.
Running
The makefiles provided include a 'run' target which can be used to run the build executable. e.g.:
Creating a new project
One simple way to create a new project is to copy the 'samples/Cpp/HelloCpp/proj.linux' folder into your project. Once here you will need to edit parts of the Makefile accordingly (at the very least the SOURCES). If you are building outside the cocos2dx tree then you will need to set $COCOS2DX_ROOT either within your Makefile or in your environment.