我正在尝试使用Windows 10中的CodeLite IDE为MinGW构建OpenCV二进制文件 . 我按照以下步骤操作:

  • official website下载了OpenCV 3.2.0自解压存档 . 并在 C:/opencv 中提取

  • 下载并安装MinGW 3.2.0(通过运行命令确保 gcc --version

  • 安装了CodeLite IDE并将MinGW配置为编译器(通过运行C测试程序确保)

  • 已下载并安装了Cmake3.10.1 . 推出Cmake-gui并尝试将二进制文件构建为 D:/opencv/build/MinGW . 点击配置 . 指定 CodeLite - MinGW Makefile 作为项目的生成器 . 有时我得到一个错误说 Error in configuration process, project files may be invalid

Screenshot: CMake Error

  • 这次再次点击 Configure 没有错误信息 . 点击 Generate . 在目标目录 D:\opencv\build\MinGW 中生成了CodeLite工作区

  • 使用CodeLite IDE打开了该Workspace . 开始构建项目 . 在62%时,它显示错误消息并停止构建 .

[60%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / blobdetector.cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / dynamic.cpp.obj [ 61%]内置目标opencv_annotation [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / fast_score.cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / fast .cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / evaluation.cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / gftt.cpp .obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / feature2d.cpp.obj [61%]构建目标opencv_visualisation mingw32-make.exe1:* [modules / ts / CMakeFiles / opencv_ts.dir / all]错误2 mingw32-make.exe1:等待未完成的作业.... CMakeFiles \ Makefile2:5379:目标'modules / ts / CMakeFiles / opencv_ts.dir / all'的配方失败[6]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / kaze.cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / kaze / AKAZEFeatures.cpp.obj [1%] 61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / kaze / KAZEFeatures.cpp.obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / kaze / fed.cpp . obj [61%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / kaze / nldiffusion_functions.cpp.obj [62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / keypoint.cpp . obj [62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / main.cpp.obj mingw32-make.exe1:[modules / objdetect / CMakeFiles / opencv_objdetect.dir / all]错误2 CMakeFiles \ Makefile2: 4649:目标'modules / objdetect / CMakeFiles / opencv_objdetect.dir / all'的配方失败[62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / mser.cpp.obj [62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / matchers.cpp.obj [62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / src / orb . cpp.obj [62%]构建CXX对象模块/ features2d / CMakeFiles / opencv_features2d.dir / opencl_kernels_features2d.cpp.obj [62%]链接CXX共享库.... \ bin \ libopencv_features2d320.dll mingw32-make.exe:* [全部]错误2 [62%]内置目标opencv_features2d Makefile:161:目标'all'失败的配方==== 1个错误,11个警告,总时间:00:04:05秒====

我也尝试了this question中提出的解决方案 . 但没有运气!

Error: CodeLite

现在我的问题是我做错了吗?以及如何解决这个问题?

我的最终目标是使用CodeLite IDE来制作OpenCV程序 . 我在我的Ubuntu机器上使用CodeLite . 这很好用 . 但这次需要窗户 . 我知道可以使用visual studio . 但那对我来说不是一个选择 . [我也试过 Code:Blocks-MinGW Makefiles 而且只有 MinGW Makefiles . 那些也开始建设,然后显示类似的错误]