windows

OpenCV QT

최진한 2018. 7. 1. 16:36

https://cmake.org/download/












https://sourceforge.net/projects/opencvlibrary/


run opencv-3.4.1-vc14_vc15.exe





gcc.exe 가 있는 folder 추가.


restart computer



run C:\Program Files\CMake\bin\cmake-gui.exe






C:/Qt/Qt5.9.6/Tools/mingw530_32/bin/gcc.exe

C:/Qt/Qt5.9.6/Tools/mingw530_32/bin/g++.exe







Set QT_MAKE_EXECUTABLE to D:\Qt\5.9\mingw53_32\bin\qmake.exe

 Set Qt5Concurrent_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Concurrent
 Set Qt5Core_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Core
 Set Qt5Gui_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Gui
 Set Qt5Test_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Test
 Set Qt5Widgets_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Widgets
 Set Qt5OpenGL_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5OpenGL
 Set CMAKE_BUILD_TYPE to Release or RelWithDebInfo






         press configure and generate


opencv/sources/modules/videoio/src/cap_dshow.cpp 에 다음 추가.


#include "precomp.hpp"


#define STRSAFE_NO_DEPRECATE

#if defined _WIN32 && defined HAVE_DSHOW

#include "cap_dshow.hpp"


C:\ufo\opencv-build 로 이동

run mingw32-make