Cocos2d-x 3.x build in Mac environment, create Xcode project, cocos2d-xxcode

Source: Internet
Author: User

Cocos2d-x 3.x build in Mac environment, create Xcode project, cocos2d-xxcode

Recently relatively idle .. Toss cocos2d-x 3. x series.

Although I have been out for a long time, I still have no time to study. Version 2.14 has been used before.


After cocos2d v3.x is released, it is a command line from configuration installation to project creation.


1. http://cn.cocos2d-x.org/download/ (the latest version of 3.3 around 5 m)


2. After the download is decompressed, open the terminal and enter the corresponding folder.

For example, my:

 cd /Users/apple/Desktop/Colin/Cocos2d-x/cocos2d-x-3.3/

Run again
./setup.py

As follows:



There will be several inquiries during this period. The Android SDK path is set. skip this step without setting Android Enter.

 ->Please enter the path of NDK_ROOT (or press Enter to skip): ->Please enter the path of ANDROID_SDK_ROOT (or press Enter to skip): ->Please enter the path of ANT_ROOT (or press Enter to skip):

Then OK. A prompt is displayed:

Please execute command: "source /Users/apple/.bash_profile" to make added system variables take effect

Just Input source/Users/apple/. bash_profile.


3. Prepare to create a project

Enter the specified folder. For example, my:

cd /Users/apple/Desktop/Colin/Cocos2d-x/cocos2d-x-3.3/tools/cocos2d-console/bin/

If it is followed by the first two steps, enter cd tools/cocos2d-console/bin directly. (Because the current is under the cocos2d-x-3.3 directory)

Run the following command:

Cocos new project name-p package name-l language-d target folder

For example, my:

./cocos new HelloWorld -p com.history.HelloWorld -l cpp -d /Users/apple/Desktop/Colin/Cocos2d-x/WorkSpace



Then the project is created in the corresponding path.




As mentioned before, skip this step if you do not need to configure the android environment.

For more information, see the following Tutorial:

Full guide to Cocos2d-x development environment in Mac Environment


Cocos2d-x 3.x full platform novice Development Configuration tutorial


Related Article

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.