« Previous - Version 7/23 (diff) - Next » - Current version
Minggo Zhang, 2011-09-20 19:15


How to run HelloWorld and tests on linux

This document will describe how to run HelloWorld and tests on linux.

1. Set up environment

  • get cocos2d-x source code
    • get latest code from git
    • get released version
  • install jdk
    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" 
    sudo apt-get update
    sudo apt-get install sun-java6-jdk
    
  • install eclipse
    Don't install eclipse by apt-get command, because the version of eclipse is too old. Down from the link:
    http://www.eclipse.org/downloads/
    For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended by ADT10.0.0.
  • install cdt plugin
  • install needed libs
    sudo apt-get install  libgl1-mesa-dev libglfw-dev freeglut3-dev libzip-dev

    If you meet problem as me, maybe you should run the command before installing the libs
    sudo apt-get -f

2. Run with makefile

3. Run with eclipse

4. Run on android emulator

  • install android sdk
  • install ADT

4.1 By eclipse

4.2 By makefile

install_cdt.jpg (46.8 kB) Minggo Zhang, 2011-09-20 22:46

import_project.jpg (32.3 kB) Minggo Zhang, 2011-09-20 22:59

select_project.jpg (75.8 kB) Minggo Zhang, 2011-09-22 22:41