ubuntu opencv报错

前端之家收集整理的这篇文章主要介绍了ubuntu opencv报错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

在配置完opencv之后,cmake测试,出现下面的错误

$ cmake .
-- OpenCV ARCH: 
-- OpenCV RUNTIME: 
-- OpenCV STATIC: ON
CMake Warning at /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
  Found OpenCV Windows Pack but it has no binaries compatible with your
  configuration.

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
  library.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


CMake Error at CMakeLists.txt:10 (find_package):
  Found package configuration file:

    /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

后来查到需要添加下面一句话

set(OpenCV_FOUND 1)
  • 1

结果依然是上面的错误,后面又查到有人使用下面的方法

from opencv/build/ copy OpencvConfig.cmake and OpenCVModules.cmake to opencv/cmake/
then in you project delete file build and run again cmake .. and make
  • 2

问题解决,原因未知。

猜你在找的Ubuntu相关文章