I have spent a long while trying to get this thing to work, and I think my error is very trivial but I have been unable to fix it. Plus, I know there have been questions about this before but none have helped me solve my issue.
I am using the android-opencv library in eclipse juno
When I build the sample, I will use sample 4 as an example, I get this message in my console:
15:29:35 **** Build of configuration Default for project org.opencv.samples.tutorial4.Sample4Mixed ****
"C:\\dev\\android-ndk-re8b-windows\\ndk-build.cmd"
Cannot run program "C:\dev\android-ndk-re8b-windows\ndk-build.cmd": Launching failed
Error: Program "C:\dev\android-ndk-re8b-windows\ndk-build.cmd" not found in PATH
PATH=[C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Broadcom\WHL\;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64\;C:\Program Files\Broadcom\WHL\SysWow64\syswow64;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Windows Live\Shared;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\MATLAB\R2011a Student\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Symantec\VIP Access Client\;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell]
15:29:35 Build Finished (took 54ms)
Where are the double \'s coming from?!
Also I did define my environmental variable NDKROOT to be the absolute path to my ndk. But to be even more safe, I defined it again in my properties->c/c++ build path.
HELP
Try the following steps:
Head to the project's properties. If you're using Windows, the shortcut is Alt + Enter
; or simply right-click the project name to find its properties.
Go to the C/C++ Build
section; under Builder Settings
tab in Build command:
text box you're likely to find something similar to that below, if it's empty then type in the similar text - namely: ${NDKROOT}/ndk-build.cmd
where NDKROOT
, as its name implies, refers to the path where your NDK root folder exists.
Now you must inform eclipse what NDKROOT
equates to; as in, where is the NDK root path. You can do this by heading to (in your project's properties) C/C++ Build
> Environment
> press Add…
Now add your environment variable named NDKROOT (the Name
) with the relevant path (Value
). Note that you're to repeat this per NDK project. You would get a window similar to that below.
Press OK
to the New variable input window and then OK
again to the properties window.
If you use Windows 7, you can set it like this:
NDKROOT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With