Struggle to configure cocos2dX in Windows XP 64 bit

Hi,

I List out the step what i have done to configure cocos2d x , Please tell where i have done the mistake

  1. I downloaded the below packages
    a) cygwin
    b) adt-bundle-windows-x86_64-20130522
    c) android-ndk-r8e
    d) cocos2d-x-2.1.4

  2. I put all packages in the C: and cygwin in this pathC:

  3. C: in this place i have.bash_profile* this file i added below 2 lines in this file
    NDK_ROOT=C:/Program/android/android-ndk-r8e
    export NDK_ROOT

  4. And i started open the cygwin.bat from C: , I got below message
    sankar@DN02 ~
    $
    i types
    cd $NDK_ROOT* and i got below line
    sankar@DN02 /cygdrive/c/Program/android/android-ndk-r8e
    $
    And i closed the cygwin.bat

  5. Now i open ndk-build.bat in notepad from C:-ndk-r8e and i added below line
    set NDK_ROOT=“C:/Program/android/android-ndk-r8e” In top of the page.

  6. And i open create-android-project.bat from C:2d-x-2.1.4 it ask for the package name i typed com.test.two
    and it ask for the project Name: two and it ask for the target id : 1
    Finally project folder is created successfully in this path C:2d-x-2.1.4

7)Now i open cygwin.bat in **C:
sankar@DN02 ~
$ cd c:/program/android/cocos2d-x-2.1.4/two/proj.android
sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$
Now i typed ./build_native.sh
I got below Error
**sankar@DN02 ~
$ cd c:/program/android/cocos2d-x-2.1.4/two/proj.android

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$ ./build_native.sh

NDK_ROOT = C:/Program/android/android-ndk-r8e
COCOS2DX_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…/

APP_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…
APP_ANDROID_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
Using prebuilt externals
cygwin warning:
MS-DOS style path detected: C:/Program/android/android-ndk-r8e/ndk-build
Preferred POSIX equivalent is: /cygdrive/c/Program/android/android-ndk-r8e/ndk-build
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
./build_native.sh: line 89: C:/Program/android/android-ndk-r8e/ndk-build: No such file or directory

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$
*


error.JPG (68.1 KB)

You have to set your NDK_ROOT variable as /cygdrive/c/program/android/android-ndk-r8e on steps 3 and 5

Hi Mad Max,

At the time of first post in the .bash_profile file , I added the below line

NDK_ROOT=C:/Program/android/android-ndk-r8e
export NDK_ROOT

After ur post i changed to

NDK_ROOT=/cygdrive/c/program/android/android-ndk-r8e
export NDK_ROOT

But both are No use still same problem i have , what we have in the first post attached image

Whats the output after changing the NDK path? Does it still point to c:or cygwin\C

I’m using cygwin in win64 but I just used environment variables (NDK_ROOT pointing to cygwin folder) rather than a bash profile.
Might be worth giving it a try.

Hi Adam,

I am in some other place so i cant able to check right now, I will check and update u tomorrow. Before I need some clarification
Did u set environment Variable by right click mycomputer~~>Advance system settings~~>Environment Variables-> ??
Variable Name — NDK_ROOT
Variable Value — c:
And i need to remove below line from .bash_profile??

NDK_ROOT=C:/Program/android/android-ndk-r8e
export NDK_ROOT

???

I’m on an XP machine at the moment (at work) so its Computer~~>Properties~~>Advanced->Environment Variables.
I’m using User vars rather than system.

I have NDK_ROOT pointing to /cygdrive/C/android-ndk-r8b
and DOCSDRIVE pointing to /cygdrive/C/Docume~1/AdamR/MyDocu~1/MyDrop~1/Progra~1 (this is my cocos path)

I don’t know much about the bash_profile so cant help there.

sankar ganesh wrote:

  1. Now i open ndk-build.bat in notepad from C:/Program/android/android-ndk-r8e and i added below line
    set NDK_ROOT=“C:/Program/android/android-ndk-r8e” In top of the page.

You need also modify this line to:
set NDK_ROOT="/cygdrive/c/program/android/android-ndk-r8e"

Hi,

As per the previous post i changed my setting , I will point out the steps below

  1. Added 2 Environment variables mycomputer~~>properties~~>advance->Environment Variables i added below variables

Variable Name : NDK_ROOT
Variable Value: /cygdrive/C/Program/android/android-ndk-r8e

Variable Name : DOCSDRIVE
Variable Value:/cygdrive/C/Program/android/cocos2d-x-2.1.4

and saved

  1. And open ndk-build.bat in notepad from C:-ndk-r8e and change the line

From
set NDK_ROOT=“C:/Program/android/android-ndk-r8e”

To
set NDK_ROOT=“/cygdrive/c/program/android/android-ndk-r8e”
and Saved

  1. Now i open the cygwin.bat from *C: and typed cd $NDK_ROOT and i got below message

sankar@DN02 ~
$ cd $NDK_ROOT

sankar@DN02 /cygdrive/c/program/android/android-ndk-r8e
$

  1. And i typed cd c:/program/android/cocos2d-x-2.1.4/two/proj.android i got below message

sankar@DN02 /cygdrive/c/program/android/android-ndk-r8e
$ cd c:/program/android/cocos2d-x-2.1.4/two/proj.android

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$

  1. And i typed ./built_native.sh i got below error

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$ ./build_native.sh
NDK_ROOT = /cygdrive/c/program/android/android-ndk-r8e
COCOS2DX_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…/

APP_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…
APP_ANDROID_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
Using prebuilt externals
./build_native.sh: line 89: /cygdrive/c/program/android/android-ndk-r8e/ndk-buil
d: No such file or directory

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$

What’s on line 89?

I don’t have a ndk_build.bat, what’s in that file?
Is this a windows version of ndk_build.sh?

I have a build.bat that just contains 1 line to call build_native.sh using Cygwin bash.

c:.exe —login ic DOCSDRIVE/cocos/cocos2dx/trialrun/proj.android/build_native.sh

I didn’t change build_native.sh, I just set up the correct environment vars.

Hi,

Line 89
87 else
88 echo “Using prebuilt externals”
89 “$NDK_ROOT”/ndk-build -C “$APP_ANDROID_ROOT” $* 90 “NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt”

above we have the line and its no.

ndk_built.bat
I download Android NDK from below Link
http://developer.android.com/tools/sdk/ndk/index.html , After i download the android-ndk-r8e-windows-x86_64.zip, I extract it inside of the zip file i have ndk_built.bat

build_native.sh

I am also didnt do any changes in the build_native.sh on C:2d-x-2.1.4\two\proj.android , Just i call the file from cygwin.bat

I’m looking in the android-ndk-r8b and I only have ndk-build and ndk-build.cmd

Is this a new file that was added in a later version of cocos2dx?

yes adam, i think so!

Ahh, ok, that makes some sense.

DO you know what calls ndk_build.bat?

Does your ndk folder have a ndk-build file in it?
Mine does but I wonder if its missing in the new version.

Hi,

I set the NDK_ROOT url in 2 places

1st place

mycomputer~~>properties~~>advance->environment Variables

Variable Name : NDK_ROOT
Variable Value: /cygdrive/C/Program/android/android-ndk-r8e

2nd Place

.bash_profile in this file at this place **C: i added below 2 lines in end of that file
NDK_ROOT=/cygdrive/c/program/android/android-ndk-r8e
export NDK_ROOT

Yes i have**ndk_build.bat* in this path C:-ndk-r8e ,i got this file after extract the android-ndk-r8e-windows-x86_64.zip

It looks like ndk-build (no extension) is being called, do you have that file?

no i didnt have anything i the folder , for your understand i attach a screen shot in this post , please get the attachment

My android-ndk-r8b folder has ndk-build and ndk-build.cmd but no ndk_build.bat

According to your screen shot, you don’t have ndk_build.bat either you only have ndk-build.cmd
Where did you get this ndk_build.bat file from?

I wonder what happened to the ndk-build (no extension) file as that looks to be the file that its trying to call.

Maybe someone else can help here as I don’t think were running the same version of the ndk.

Hi Adam,

I download NDK again from the below link

http://developer.android.com/tools/sdk/ndk/index.html and i extract it , Now i have ndk-build.cmd in this path C:-ndk-r8e

Now i open cygwin.bat at this path C: and I called thebuild_native.sh* from below path
C:2d-x-2.1.4\two\proj.android

For your understand i attach a screenshot in this post , please get the attachment…

i got below Error

sankar@DN02 ~
$ cd $NDK_ROOT

sankar@DN02 /cygdrive/c/program/android/android-ndk-r8e
$ cd c:/program/android/cocos2d-x-2.1.4/two/proj.android

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$ ./build_native.sh
NDK_ROOT = /cygdrive/c/program/android/android-ndk-r8e
COCOS2DX_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…/

APP_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android/…
APP_ANDROID_ROOT = /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
Using prebuilt externals
ERROR: Cannot find ‘make’ program. Please install Cygwin make package
or define the GNUMAKE variable to point to it.

sankar@DN02 /cygdrive/c/program/android/cocos2d-x-2.1.4/two/proj.android
$

Did you install make with the other cygwin components?

Just i install the cygwin.exe only ,where will i get the make component ?