带有 CMake 错误的 OpenCV 构建

标签 opencv visual-studio-2013 cmake opencv3.0

我尝试使用 CMake VS 2013 构建 OpenCV ,并遵循以下所有步骤。构建成功,跳过了几个项目。然后我通过构建 INSTALL 项目来安装它。问题是,我已经为个别任务构建了库,但我需要 opencv_world300.dll 供使用。(我已经使用了预建库中的 opencv_world300.dll,但已经有一年了,并且有很多 promise 要掌握 GIT我在预建版本中遇到了错误,所以我需要从头开始构建)。
MS VC2013 解决方案资源管理器中没有构建 opencv_world300.dll 的项目。我如何构建或找到它?
截至目前,我做了一些探索并做到了这一点:
在按照从头开始构建 OpenCV 二进制文件的步骤时,我找到了勾选 WITH_OPENCV_WORLD 的选项。我检查了它并点击配置。它配置成功,然后我点击生成,它显示如下错误(红色):

CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "zlib" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "zlib" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libjpeg" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libwebp" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libpng" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libtiff" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libjasper" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "IlmImf" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "zlib" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "zlib" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libjpeg" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libwebp" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libpng" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libtiff" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "libjasper" that is not in the export set.
CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_world" which requires target "IlmImf" that is not in the export set.
Generating done

看到它,我估计存在依赖问题,因为 opencv_world300 使用了所有其他模块。

有没有人了解 OpenCV 或 CMake,可以告诉我这个问题的解决方案。我需要更改 Cmake 根文件或缓存文件吗?我对 CMake 完全一无所知。

最佳答案

也许以下 OpenCV 错误报告可能适用于您的情况。

http://code.opencv.org/issues/3448

关于带有 CMake 错误的 OpenCV 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29579232/

相关文章:

ubuntu - 安装ubuntu boost包时cmake无法链接到自定义boost

c++ - 为另一个分配矩阵中的特定范围创建 cv::Mat header

opencv - 如何从细节丰富的图像中指定计算机感兴趣的区域?

android - OpenCV Android Studio 模块导入问题

asp.net - Visual Studio 2013 不会显示设计 View

cmake - CMake 命令 find_package 如何与变量 <name>_DIR 一起使用

python - 与 Python 和 OpenCv 链接

python - 使用opencv提取图像的轮廓作为连续路径

c++ - 使用 OpenCV 3.0 + Visual Studio 2013 镜像网络摄像头流

regex - Visual Studio Find 使用正则表达式查找