3

I'm using the android ndk, version r7b on Windows. I'd heard that starting with this version you don't need cygwin or bash to run the ndk-build executable but maybe I'm wrong. In any case I can't seem to get it to work in Eclipse just with 'ndk-build' as the command line option, I still need to stick 'bash' in front of there. Does anyone know whether this is possible?

Right now when I swap out 'bash ndk-build'.... with just 'ndk-build'... Eclipse says:

Cannot run program "c:\temp\android-ndk-r7b\ndk-build": Launching failed
Error: Program "c:/temp/android-ndk-r7b/ndk-build" is not found in PATH

..which is simply not true, the android-ndk-r7b directory is in my PATH environment variable and has been ever since I installed the NDK a week ago. I've opened and closed Eclipse numerous times since then so the value should be available to it. So I'm not sure what's going on here. Do you still need bash for r7b?

(BTW, I'm using c:\temp as the path here because I found out the hard way about NDK not liking directory paths with spaces, and put it there as a quick-fix. It'll find a permanent home eventually.)

asked Feb 29, 2012 at 18:54
2
  • Try ndk-build.cmd as command to run for building. Commented Feb 29, 2012 at 19:09
  • Thank you for the reply Mārtiņš. If I do that I get an unexpected end of file error about '[obj/local/armeabi/objs-debug/openal/__/__/__/common/openal/alAuxEffectSlot.o] Error 1', while reverting to the bash command works fine. Commented Feb 29, 2012 at 19:19

3 Answers 3

8

Just FYI for others for whom ndk-build is not working.

My setup is: Windows 7, Eclipse[Indigo], NDK 8

instead of ndk-build, ndk-build.cmd is working fine for me.

answered Jul 18, 2012 at 7:12
Sign up to request clarification or add additional context in comments.

Comments

3

Just wanna share the solution. Im using MacOS Lion but it is not platform specific problem. It is in Eclipse environment settings. Go to your project Properties -> C/C++ Build -> Environment. Click Add... and set name as PATH, value as your (echo $PATH) command from terminal/cmd return string without any quotes. This helps me, and i hope will help you too.

answered May 30, 2012 at 12:29

Comments

0

On Windows 8, ndk-r9, Eclipse Indigo: I got tired of trying to get Eclipse to flow with the ndk-build.cmd. The solution was to install CygWin and fall back to 'bash ndk-build'

answered Aug 25, 2013 at 8:25

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.