Getting started with 2.1beta3, errors with build_native.sh

Created an Android project under Win 7 x64 as described in http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started

There seems to be a problem finding the NDK builders if you look at the errors below (the path is obviously wrong, with “window-” in the path, and the last part should be just “gcc”). The correct path should be like this, but I cannot find where it is breaking:

@
/cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/arm-linux-androideabi/bin/gcc
@

Errors:

@
./build_native.sh
NDK_ROOT = /cygdrive/d/tmp/android-ndk-r8b/
COCOS2DX_ROOT = /cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android/…/…
APP_ROOT = /cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android/…
APP_ANDROID_ROOT = /cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android
Using prebuilt externals
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-gcc: Command not found
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
make: Entering directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
Cygwin : Generating dependency file converter script
Compile*+ thumb : game_shared <= main.cpp
/bin/sh: /cygdrive/d/tmp/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-/bin/arm-linux-androideabi-g*+: No such file or directory
/cygdrive/d/tmp/android-ndk-r8b/build/core/build-binary.mk:255: recipe for target `obj/local/armeabi/objs/game_shared/hellocpp/main.o’ failed
make: * [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 127
make: Leaving directory `/cygdrive/d/tmp/cocos2d-2.1beta3-x-2.1.0/s6/proj.android’
@

I followed the advice in this thread and it seems to have worked (hardcode HOST_TAG := windows in the NDK .mk becuase of NDK bug):