Most of the instructions are found in this thread with the exception of adding build command:
http://www.cocos2d-x.org/forums/6/topics/44319?r=44530#message-44530
-
Create a new C++ project using create_project.py(GUI)
-
Add NDK_ROOT, ANDROID_SDK_ROOT, NDK_TOOLCHAIN_VERSION as C++ build environment variables
-
Import project ‘libcocos2dx’ and the new project into eclipse, and add ‘libcocos2dx’ as library of new project
-
Convert the new project to C++ project by ‘Convert to a C/C++ Project’, but I found CDT Builder is not added into Builders, so I edit .project file manually to add CDT Builder. Under buildSpec, add
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
- uncheck ‘use default build command’ and change the build command in ‘C/C++ Build->Builder Settings’ to
C:/your-python-installation-dir/python ${ProjDirPath}/build_native.py
-
uncheck Syntax and Semantic Errors in C/C++ General->Code Analysis(use project settings)
-
remove ‘Classes’, ‘cocos2dx’, ‘extensions’ and ‘scripting’ link folder
-
goto ‘C/C++ general->Paths and Symbols->Source Location’ and add link folder ‘Classes’ and ‘cocos2dx’ to the source location
-
goto ‘C/C++ general->Paths and Symbols->includes’ and add ${NDK_ROOT}/platforms/android-18/arch-arm/usr/include into include directories
-
click ‘Build Project’
Tested on Windows XP