【问题标题】:Cmake Opencv for Android under Windows... can't find iostreamWindows下的Cmake Opencv for Android...找不到iostream
【发布时间】:2012-10-21 19:38:41
【问题描述】:

我正在尝试为 opencv 运行 cmake_android.cmd 脚本,详见此处: http://opencv.willowgarage.com/wiki/Android2.3.0#Windows_.28native.29

所以我可以得到一个 OpenCV.mk 文件以用于 Android

所以我启动 cmd.exe 当我在opencv\android 我跑scripts\cmake_android.cmd

它达到了大约 3% 并且因为找不到 iostream 而失败

[  3%] Building CXX object 3rdparty/libtiff/CMakeFiles/libtiff.dir/tif_stream.cxx.o
C:\opencv\3rdparty\libtiff\tif_stream.cxx:31:20: error: iostream: No such file or directory

这是我的 wincfg.cmd 文件

:: variables required for OpenCV build ::
:: Note: all pathes should be specified without tailing slashes!
SET ANDROID_NDK=C:\android-ndk-r8b-windows\android-ndk-r8b
SET CMAKE_EXE=C:\Program Files (x86)\CMake 2.8\bin\cmake.exe
SET MAKE_EXE=%ANDROID_NDK%\prebuilt\windows\bin\make.exe

:: variables required for android-opencv build ::
SET ANDROID_SDK=C:\Program Files (x86)\Android\android-sdk
SET ANT_DIR=C:\opencv\android\apache-ant-1.8.4
SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09

:: configuration options ::
:::: general ARM-V7 settings
SET ANDROID_ABI=armeabi-v7a
SET BUILD_DIR=build

:::: uncomment following lines to compile for old emulator or old device
::SET ANDROID_ABI=armeabi
::SET BUILD_DIR=build_armeabi

:::: uncomment following lines to compile for ARM-V7 with NEON support
::SET ANDROID_ABI=armeabi-v7a with NEON
::SET BUILD_DIR=build_neon

:::: uncomment following lines to compile for x86
::SET ANDROID_ABI=x86
::SET BUILD_DIR=build_x86

:::: other options
::SET ANDROID_NATIVE_API_LEVEL=8   &:: android-3 is enough for native part of OpenCV but android-8 is required for Java API

非常感谢任何帮助!

【问题讨论】:

标签: android opencv cmake


【解决方案1】:

对于 NDK r8b,您需要来自存储库的最新 OpenCV。

OpenCV 2.4.2 版本支持从 r5 到 r8 的 NDK。来自 sourceforge 和 Google Play 的预编译 Android 二进制文件是使用 NDK r8 编译的。

【讨论】:

  • 谢谢!我知道这一点,我想你回答它的同时。我成功编译了所有内容。我的项目现在正在我的手机上运行。太棒了!
猜你喜欢
  • 2018-03-19
  • 1970-01-01
  • 2015-07-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-02-07
  • 2017-07-11
  • 2015-05-26
相关资源
最近更新 更多