- Ubuntu 12.10+
- Cocos2d-x v3.0 (HERE)
- CMake 2.6+
-
Download cocos2d-x and unzip it. (maybe: ~/)
-
Install dependencies. The dependencies are:
libx11-dev libxmu-dev libglu1-mesa-dev libgl2ps-dev libxi-dev g++ libzip-dev libpng12-dev libcurl4-gnutls-dev libfontconfig1-dev libsqlite3-dev libglew*-dev libssl-dev
If you are using Ubuntu/Debian, there is a shell script build/install-deps-linux.sh for you to install the dependences easily. Run commands below in terminal:
$ cd $cocos2dx_root/build
$ ./install-deps-linux.sh
Otherwise, you should install the dependencies manually.
Run cmake
to generate makefile
:
$ mkdir linux-build
$ cd linux-build
$ cmake ../..
When cmake
returns correctly, many files & folders will be generated in coocs2dx_root/build/linux-build
Run `make` to compile:
$ make
Application will be generated in `cocos2dx_root/build/linux-build/bin/cpp-tests/` if compiled successfully.
$ cd bin/cpp-tests/
$ ./cpp-tests