首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何构建OpenBR?

如何构建OpenBR?
EN

Stack Overflow用户
提问于 2017-03-08 04:42:03
回答 1查看 546关注 0票数 0

当我在windows上构建OpenBR时,以及当我在A hacker's guide to building, editing, and running OpenBR中提到的VS2015 x86 x64交叉工具命令提示符上键入以下代码时:

代码语言:javascript
复制
cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_PATH="H:/opencv-2.4.11/build/install;H:/Qt/Qt‌​5.8/5.8/msvc2015_6‌​4" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release ..

我得到了这个错误:

代码语言:javascript
复制
H:\openbr\build-msvc2015>cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_
PATH="H:/opencv-2.4.11/build/install;H:/Qt/Qt5.8/5.8/msvc2015_64" -DC
MAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=
Release ..
-- The C compiler identification is MSVC 19.0.23506.0
-- The CXX compiler identification is MSVC 19.0.23506.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studi
o 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- OpenCV ARCH: x64
-- OpenCV RUNTIME:
-- OpenCV STATIC: OFF
CMake Warning at H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake:161
(message):
  Found OpenCV Windows Pack but it has not 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:88 (find_package)


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

    H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.


-- Configuring incomplete, errors occurred!
See also "C:/openbr/build-msvc2015/CMakeFiles/CMakeOutput.log".

有什么问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-04-01 00:18:37

尝试编辑OpenCVConfig.cmake文件(H:/opencv-2.4.11/build-msvc2015/install/OpenCVConfig.cmake).并将OpenCV_RUNTIME设置为VC14:

代码语言:javascript
复制
elseif(MSVC_VERSION EQUAL 1800)
  set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
  set(OpenCV_RUNTIME vc14)
endif()
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42657939

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档