Play with Eclipse Cocos 2DX Development

Source: Internet
Author: User

Start studying Cocos2dx,mark. Configuration steps for this
1 Downloads Eclipse
2 download Android SDK, configure SDK path, add environment variable
3 Installing ADT
4 Download Android NDK, configure NDK Path
5 Download COCOS2DX Development Kit
Note ndk8+ does not need Cygwin, can save n more download time
Let's take hellocpp as an example


A Import Address D:\soft\cocos2d-x-2.1.5\samples\Cpp\HelloCpp\proj.android
soft\cocos2d-x-2.1.5 is my cocos2dx after decompression path specific according to their own modifications
B Copy Source Lib package all contents into the project
D:\soft\cocos2d-x-2.1.5\cocos2dx\platform\android\java\src\org\cocos2dx
After the copy is complete, the project

C Copy the resource file into the project assets
D:\soft\cocos2d-x-2.1.5\samples\Cpp\HelloCpp\Resources
Note that there may be a folder under this file, we need to copy the following files to be able to find a casual

D Modify the Application.mk file configuration
Add content after adding red as below
App_stl: = gnustl_static
App_cppflags: =-frtti-dcocos2d_debug=1
Stlport_force_rebuild: = True
Ndk_module_path:=d:\soft\cocos2d-x-2.1.5;d:\soft\cocos2d-x-2.1.5\cocos2dx\platform\third_party\android\ prebuilt
E Modify the compiler, right click on the project select Properties, modify 2 content
Build command, Builder Settings, C + + Build
C + + Build environment->add

This path depends on your NDK path


This variable is the same as the application.mk added above, depending on the file path of your machine


To complete this configuration, right-click the project->run as->android application
Run the project to the machine, the first compile content more, time is longer

So eclipse can also play the COCOS-2DX development.

So, I sold the first step of learning cocos-2dx.

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.