Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

in general, building for mingw is much similar to the way it's done on linux

  1. make a build folder, cd there.
  2. run cmake [lots of params] [path to opencv_folder]

    • for mingw, you will have to give the location of your compiler, and make tool, like:

      cmake -G "MinGW Makefiles" -D CMAKE_CXX_COMPILER="D:\Programme\MinGW\bin\mingw32-g++.exe" -D CMAKE_MAKE_PROGRAM="D:\Programme\MinGW\bin\mingw32-make.exe"

    • -D BUILD_opencv_python3=OFF (or ON, depending, if you're building opencv3, and if you want py3 support)

      if all went fine, and it liked one of your your numpy installs, proceed to the next stage:

  3. run make [check for build errors]

  4. run make install . this will copy your new cv2.pyd to python/libs/site-packages.