Cocos2d-x on Windows

I’m trying to get cocos2d-x on android in eclipse on windows to compile natively (without cygwin) using ndk-build.cmd. I’ve ported the build_native.sh script over to a batch file successfully but I’m getting this error:

make: No rule to make target `/cygdrive/c/cocos2d-x/AppTest/proj.android/…/…/cocos2dx/CCConfiguration.cpp’, needed by `obj/local/armeabi/objs-debug/cocos2dx_static/CCConfiguration.o’. Stop.

My question is, is Cocos2d-x for Android dependent on cygwin under windows? Or should I be able to get ndk-build.cmd to work? I have no idea where the make file is trying to grab cygdrive from, everything I have is set to C:(that I know of).

Thanks for any info.

Well I configured android in my Windows without problems and yes, you need Cygwin.

Maybe in your mk file you have a mistake.

If you can send a screenshot of your mk files maybe I can help you.

Or look this guide: http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started

Advise me if you continue having problems.

Carlos,

Thanks for the reply! I do have everything work and chugging along with cygwin, so no problems there. I just didn’t like how long it takes to compile and thought using the windows ndk-build.cmd would be quicker. Looks like that flow isn’t setup.

Regards

Carlos Piñan wrote:

Well I configured android in my Windows without problems and yes, you need Cygwin.
>
Maybe in your mk file you have a mistake.
>
If you can send a screenshot of your mk files maybe I can help you.
>
Or look this guide: http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started
>
Advise me if you continue having problems.

I found a solution, albeit not the best one.

You should do a Project->Clean before you build. When you try and build without doing this, it causes that error. I found this solution on http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/. I didn’t look to see if there were any other tips/tricks to only doing partial builds, but hopefully it has something.

EDIT: Actually, it works just fine. After the clean, it only builds files that you’ve changed. You should be good to go after that!

I am also facing the same problem …

No rule to make target `/cygdrive/d/android/cocos2d-x-master/T12/proj.android/…/…/cocos2dx/CCConfiguration.cpp’, needed by `obj/local/armeabi/objs/cocos2dx_static/CCConfiguration.o’. Stop.

I tried the clean project and after this Build it again ……

But no success …. Agin the same error occurred

so, If anyone have a solution for this … Help me out of this

delete obj folder and also all folders from libs and try to build…

@Viraj Dasondi: this solution worked for me. As i changed machine and had problem of compiling. But your solution worked… :slight_smile: