本文介绍了OpenCV Native样本未建立的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了很长时间试图让这个东西工作,我认为我的错误是微不足道的,但我一直无法解决它。另外,我知道以前有一些问题,但没有一个帮助我解决了我的问题。

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.

我在eclipse juno中使用android-opencv库

I am using the android-opencv library in eclipse juno

当我构建示例时,我将使用示例4作为示例,我在我的控制台中收到此消息:

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)

双重来自哪里?!

另外我确定了我的环境变量NDKROOT成为我的ndk的绝对路径。但是要安全得多,我在我的属性 - > c / c ++构建路径中再次定义了它。

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.

帮助

推荐答案

尝试以下步骤:


  1. 转到项目的属性。如果您使用的是Windows,则快捷方式为 Alt + Enter ;或者直接右键单击项目名称以查找其属性。

  1. 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.

转到 C / C ++ Build 生成器设置标签下的构建命令:文本框中,您可能会发现类似于以下内容,如果空,然后键入类似的文本 - 即: $ {NDKROOT} /ndk-build.cmd 其中 NDKROOT ,as其名称意味着指NDK根文件夹存在的路径。

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.

现在你必须通知eclipse什么 NDKROOT 等于;如在,NDK根路径在哪里。您可以通过标题(在项目的属性中)来执行此操作 C / C ++ Build > 环境>按添加...

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…

现在添加名为NDKROOT的环境变量( Name )与相关路径()。请注意,您将根据NDK项目重复此操作。你会得到一个类似于下面的窗口。

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.

确定新变量输入窗口,然后再次将 OK 窗口。

Press OK to the New variable input window and then OK again to the properties window.

这篇关于OpenCV Native样本未建立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 20:00