cocos2dx-3.3.1 Environment construction under Linux

Source: Internet
Author: User

1. Installation dependencies

Dependencies include:

libx11-devlibxmu-devlibglu1-mesa-devlibgl2ps-devlibxi-devg++ Libzip-devlibpng12-devlibcurl4-gnutls-devlibfontconfig1-devlibsqlite3-devlibglew*-devlibssl-dev

If your system is Ubuntu/debian, you can install the dependency by executing the install-deps-linux.sh script under the build directory, or you can install it yourself
$ cd cocos2d-x-3.1.1$ CD build$./install-deps-linux.sh


2. After the dependency installation is complete, go to the build directory and execute the cmake command to generate the makefile file

$ cd build$ mkdir linux-build$ CD linux-build$ cmake. /..


3.cmake after successful completion, a lot of files will be generated in the Build/linux-build directory


Perform make compilation

Make

If the compilation is correct, the project will be generated under the build/linux-build/bin/cpp-tests/directory


4. Run cpp-tests to verify that the compilation was successful

$ cd bin/cpp-tests/$./cpp-tests



5. Create a project
Enter the Tools/cocos2d-console/bin path
$ python install.py
The path to the console installation is displayed in the installation, for example

Cocos New project name-L language-p package name-D path
For example

Cocos New Game1-p com.games.demo-l cpp-d/home/liyuhen/projects


6. Switch to the project path, compile and execute

Cocos Run-p Linux



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.