Error: Cannot run program "\ndk-build.cmd" [closed]
Hello again, I imported the sample files from OpenCV4Android-SDK. I used Eclipse, installed the CDT and the NDK but I got this kind of error. "Cannot run program "\ndk-build.cmd": The system cannot find the file specified." Why is this happening? Please help!
Here is my directory and the ndk-build.cmd ---------------------------------
-------And my Environment Variables -------------------------
Have you set NDKROOT environment variable?
Have you tried to remove the ".cmd" at the end of the command inside eclipse ?
@Kirill Kornyakov Yes. In Properties->C/C++ Build->Environment. NDKROOT=C:\android-ndk-r8b. @Oscanto. I'm using Windows7 so removing .cmd is not needed.
My commandline can detect ndk-build.cmd. I don't know if I correctly compiled the file. Now I want to know what will I do next. Here is my post http://answers.opencv.org/question/4149/opencv-ndk-buildcmd-next-move/?comment=4152#comment-4152
Be aware that "Properties->C/C++ Build->Environment" settings are per-project, so your change affects only one project. Try Eclipse menu 'Window' -> Preferences -> C/C++ -> Build -> Env
@Andrey Pavlenko, I also tried that. Still no effect.
That's impossible... Then open the project properties -> c/c++ build and set the full path to your 'ndk-build.cmd' instead of '${NDKROOT}/ndk-build.cmd'
I did that already. The only way to compile is through commandline.
Eclipse 4.x gets changed vars values after restart.
Eclipse 3.x doesn't do it even after restart: you need manually clean '<eclipse workspace dir>\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.cdt.core.prefs'
Solved by directly putting absolute path of ndk-build.cmd for e.g.(C:\Users\android-ndk-r9d) in eclipse C++ build