我尝试使用 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/