繁体   English   中英

OpenCV Native Samples未构建

[英]OpenCV Native Samples are not building

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

我在eclipse juno中使用android-opencv库

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

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 ++构建路径中再次定义它。

救命

请尝试以下步骤:

  1. 前往项目的财产。 如果您使用的是Windows,则快捷键为Alt + Enter ; 或者只需右键单击项目名称即可查找其属性。

  2. 转到C/C++ Build部分; Build command:文本框中的Build command: Builder Settings选项卡下,您可能会找到类似于下面的内容,如果它是空的,则输入类似的文本 - 即: ${NDKROOT}/ndk-build.cmd其中NDKROOT ,其名称implies,指的是NDK根文件夹所在的路径。 在此输入图像描述

  3. 现在你必须通知eclipse NDKROOT等同于什么; 如在,NDK根路径在哪里。 您可以通过前往(在项目的属性中) C/C++ Build > Environment >按Add…

  4. 现在添加名为NDKROOT( Name )的环境变量以及相关路径( Value )。 请注意,您要为每个NDK项目重复此操作。 你会得到一个类似于下面的窗口。 在此输入图像描述

  5. 按“ OK到“ 新建变量”输入窗口,然后再次OK到属性窗口。

如果您使用的是Windows 7,则可以像这样设置:

  1. 右键单击“ 我的电脑
  2. 点击“ 属性
  3. 点击“ 高级系统
  4. 创建一个新变量NDKROOT
  5. 将值更改为NDK路径
  6. 重启Eclipse
  7. 点击“ 确定

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM