Check the box [X]WITH_QT(对于QT 5,使用QT = OFF构建OpenCV。 对于QT 4,使用QT = ON构建OpenCV。) Check the box [X]WITH_OPENGL
Uncheck the box []ENABLE_PRECOMPILED_HEADERS Check the box [X] Build_opencv_world(如果不编译opencv_contrib则勾选)
在”Build的步骤“下方的Targets中勾选install
。
问题解决:
If, in the file opencv/sources/modules/videoio/src/cap_dshow.cpp, you have the following error : 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope ...
try this :put the following line: #define NO_DSHOW_STRSAFE, before the line : #include "DShow.h"
If you have the error: ‘nullptr’ was not declared in this scope..
try this: in cmake check the box ENABLE_CXX11
If, in the file modules\videoio\src\cap_msmf.cpp you have the error: using invalid field '{anonymous}::ComPtr<T>::p'..
try this: in cmake unchecking WITH_MSMF