qtopencvinstallationcmakemingw32

OpenCV, video/io can't build during qt install


I'm trying to install opencv for qt and i'm doing this following tutorial :

https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows

Also i use qt 5.12.2 with mingw 7.3.0 and opencv 4.0.1.

I already test without video/io and the install go through properly but when i check video/io in cmake i'm getting this error :

 C:\opencv-build>mingw32-make install 
[  2%] Built target zlib 
[  6%] Built target libjpeg-turbo 
[  9%] Built target libtiff 
[ 17%] Built target libwebp 
[ 20%] Built target libjasper 
[ 21%] Built target libpng 
[ 26%] Built target IlmImf 
[ 32%] Built target libprotobuf 
[ 32%] Built target quirc 
[ 33%] Built target ade 
[ 39%] Built target opencv_core 
[ 44%] Built target opencv_imgproc 
[ 46%] Built target opencv_imgcodecs 
[ 46%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj In file included from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:45:0: C:\opencv\sources\modules\videoio\src\cap_dshow.hpp:33:18: warning: 'virtual bool cv::VideoCapture_DShow::isOpened() const' can be marked override [-Wsuggest-override]
     virtual bool isOpened() const;
                  ^~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:692:26: warning: 'virtual ULONG SampleGrabberCallback::AddRef()' can be marked override [-Wsuggest-override]
     STDMETHODIMP_(ULONG) AddRef() { return 1; }
                          ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:693:26: warning: 'virtual ULONG SampleGrabberCallback::Release()' can be marked override [-Wsuggest-override]
     STDMETHODIMP_(ULONG) Release() { return 2; }
                          ^~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:697:18: warning: 'virtual HRESULT SampleGrabberCallback::QueryInterface(const IID&, void**)' can be marked override [-Wsuggest-override]
     STDMETHODIMP QueryInterface(REFIID, void **ppvObject){
                  ^~~~~~~~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:705:18: warning: 'virtual HRESULT SampleGrabberCallback::SampleCB(double, IMediaSample*)' can be marked override [-Wsuggest-override]
     STDMETHODIMP SampleCB(double , IMediaSample *pSample){
                  ^~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:729:18: warning: 'virtual HRESULT SampleGrabberCallback::BufferCB(double, BYTE*, long int)' can be marked override [-Wsuggest-override]
     STDMETHODIMP BufferCB(double, BYTE *, long){
                  ^~~~~~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                 from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp: In member function 'void videoInput::getMediaSubtypeAsString(GUID, char*)': C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2296:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
     if( type == MEDIASUBTYPE_RGB24)     sprintf(tmpStr, "RGB24");
                                         ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2296:57: warning: left operand of comma operator has no effect [-Wunused-value]
     if( type == MEDIASUBTYPE_RGB24)     sprintf(tmpStr, "RGB24");
                                                         ^~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2297:5: error: 'else' without a previous 'if'
     else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
     ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                 from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2297:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
     else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
                                         ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2297:57: warning: left operand of comma operator has no effect [-Wunused-value]
     else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
                                                         ^~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2298:5: error: 'else' without a previous 'if'
     else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
     ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                 from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2298:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
     else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
                                         ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2298:57: warning: left operand of comma operator has no effect [-Wunused-value]
     else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
                                                         ^~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:5: error: 'else' without a previous 'if'
     else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
     ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                 from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
     else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
                                         ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:57: warning: left operand of comma operator has no effect [-Wunused-value]
     else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
                                                         ^~~~~~~~ 
C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2301:5: error: 'else' without a previous 'if'
         else if(type == MEDIASUBTYPE_YVYU)  sprintf(tmpStr, "YVYU");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2301:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if(type == MEDIASUBTYPE_YVYU)  sprintf(tmpStr, "YVYU");
                                             ^ 
C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2304:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if(type == MEDIASUBTYPE_UYVY)  sprintf(tmpStr, "UYVY");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2305:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if(type == MEDIASUBTYPE_YV12)  sprintf(tmpStr, "YV12");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2306:5: error: 'else' without a previous 'if'
         else if(type == MEDIASUBTYPE_YVU9)  sprintf(tmpStr, "YVU9");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2306:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if(type == MEDIASUBTYPE_YVU9)  sprintf(tmpStr, "YVU9");
                                             ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2306:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if(type == MEDIASUBTYPE_YVU9)  sprintf(tmpStr, "YVU9");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2307:5: error: 'else' without a previous 'if'
         else if(type == MEDIASUBTYPE_Y411)  sprintf(tmpStr, "Y411");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2307:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if(type == MEDIASUBTYPE_Y411)  sprintf(tmpStr, "Y411");
                                             ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2307:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if(type == MEDIASUBTYPE_Y411)  sprintf(tmpStr, "Y411");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2308:5: error: 'else' without a previous 'if'
         else if(type == MEDIASUBTYPE_Y41P)  sprintf(tmpStr, "Y41P");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2349:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
                                             ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2349:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
                                                             ^~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2350:5: error: 'else' without a previous 'if'
         else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2350:47: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
                                                   ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2350:63: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
                                                                   ^~~~~~~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2448:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
                                                             ^~~~~~ 
// CUT FOR SPACE //
// CUT FOR SPACE //

C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2450:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2451:5: error: 'else' without a previous 'if'
         else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2451:45: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
                                                 ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2451:61: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
                                                                 ^~~~~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2452:5: error: 'else' without a previous 'if'
         else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2452:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
                                             ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2452:57: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
                                                             ^~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2453:5: error: 'else' without a previous 'if'
         else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2453:42: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
                                              ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2453:58: warning: left operand of comma operator has no effect [-Wunused-value]
         else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
                                                              ^~~~~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2454:5: error: 'else' without a previous 'if'
         else sprintf(tmpStr, "%u",prop);
         ^~~~ In file included from C:/Qt/Qt5.12.3/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                     from C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:111: C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2454:10: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
         else sprintf(tmpStr, "%u",prop);
              ^ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2454:26: warning: left operand of comma operator has no effect [-Wunused-value]
         else sprintf(tmpStr, "%u",prop);
                              ^~~~ C:\opencv\sources\modules\videoio\src\cap_dshow.cpp:2454:31: warning: right operand of comma operator has no effect [-Wunused-value]
         else sprintf(tmpStr, "%u",prop);
                                   ^~~~ 
mingw32-make[2]: *** [modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:181: modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj] Error 1 
mingw32-make[1]: *** [CMakeFiles\Makefile2:2305:modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 
mingw32-make: *** [Makefile:165: all] Error 2

and when I configure opencv before the building with Cmake i get : (but it seems good)

    libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-4.0.1-libjpeg-turbo
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
Could NOT find LAPACK (missing: LAPACK_LIBRARIES) 
    Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: C:/opencv-build/python_loader
Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx2.cpp
Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx2.cpp
Excluding from source files list: modules/imgproc/src/filter.avx2.cpp
Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx2.cpp
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Excluding from source files list: modules/features2d/src/fast.avx2.cpp
Excluding from source files list: modules/calib3d/src/undistort.avx2.cpp

General configuration for OpenCV 4.0.1 =====================================
  Version control:               unknown

  Platform:
    Timestamp:                   2022-06-21T13:39:36Z
    Host:                        Windows 10.0.19042 AMD64
    CMake:                       3.23.2
    CMake generator:             MinGW Makefiles
    CMake build tool:            C:/Qt/Qt5.12.3/Tools/mingw730_32/bin/mingw32-make.exe
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2
      requested:                 SSE2
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX
      requested:                 SSE4_1 SSE4_2 AVX FP16
      SSE4_1 (8 files):          + SSE3 SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (5 files):             + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 AVX

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Qt/Qt5.12.3/Tools/mingw730_32/bin/g++.exe  (ver 7.3.0)
    C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  C:/Qt/Qt5.12.3/Tools/mingw730_32/bin/gcc.exe
    C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -mfpmath=sse -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -mfpmath=sse -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--gc-sections  
    Linker flags (Debug):        -Wl,--gc-sections  
    ccache:                      NO
    Precompiled headers:         NO
    Extra dependencies:          opengl32 glu32
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python_bindings_generator stitching ts video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java js python2 python3
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  Windows RT support:            NO

  GUI: 
    QT:                          YES (ver 5.12.3)
      QT OpenGL support:         YES (Qt5::OpenGL 5.12.3)
    Win32 UI:                    YES
    OpenGL support:              YES (opengl32 glu32)
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        build-libjpeg-turbo (ver 1.5.3-62)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.35)
    TIFF:                        build (ver 42 - 4.0.9)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (ver 58.35.100)
      avformat:                  YES (ver 58.20.100)
      avutil:                    YES (ver 56.22.100)
      swscale:                   YES (ver 5.3.100)
      avresample:                YES (ver 4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES

  Parallel framework:            none

  Trace:                         YES (built-in)

  Other third-party libraries:
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (no extra features)
    Include path:                C:/opencv/sources/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            C:/App/python35/python.exe

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    C:/opencv-build/install
-----------------------------------------------------------------

Configuring done

It made several days that i'm looking for this problem but i didn't find anything on other topics so I decided to post here to find some help.


Solution

  • I finally find a solution on another opencv forum :

    edit file %OPENCV_HOME%\sources\modules\videoio\src\cap_dshow.cpp and add :

    #define STRSAFE_NO_DEPRECATE
    

    Since i made it everything work, hope it will help someone else if ever

    opencv topic : https://answers.opencv.org/question/62580/not-able-to-build-opencv3-rc1-with-debug-build-type/