OpenCV 编译

Code : v4.3.0

--------------------------

1. Use CMake, drag CMakefileList.txt

2. Pre-build VTK, Specify VTK build directory in Ungrouped entries

3. Click Configure, wait
  (a) Tick WITH/"WITH_QT"
   Tick BUILD/Build_opencv_world, to generate only 1 lib, else many libs gen.
  (b) Untick OPENCV/OPENCV_ENABLE_ALLOCATOR_STATS, or else below problem occur
    gcc: error: long: No such file or directory
    C:\mingw64\bin\windres.exe: preprocessing failed.
    mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1506: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
    mingw32-make[2]: *** Waiting for unfinished jobs....
    mingw32-make[1]: *** [CMakeFiles\Makefile2:2237: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
    mingw32-make: *** [Makefile:179: all] Error 2
  (c) If you have already compiled  zlib, jpeg, png, tiff, protobuf, you can untick in BUILD group, then specify the path after "Configure" step.
  (d) in group, fill OPENCV/OPENCV_EXTRA_MODULE_PATH value : D:/__WORK__/01_CodeDev/OpenSource/OpenCV/code/opencv-4.3.0/opencv_contrib/modules

4. Generate, then build: mingw32-make -j8

5. If problem occur when build cv_version.rc, COmmand line too long, then move the OpenCV directory to D:/OpenCV, then build.

6. The OpenCV requires python 3.2, but if you PC installs Python 2.7, please untick python items in BUILD group

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值