Installation Visual Studio 2022

Hello, so following a tutorial on how to build the library myself for Visual Studio 2022 on Windows 10, everything so far has gone to plan apart from the final stage whilst using cmake…

All files have been transfered to the build folder via cmake, only Iam missing 3 files from which to build in Visual Studio, namley these files…

These files are from the tutorial…

Any help on where Iam going wrong would be helpful… I have a wedding to attend at the end of the year! Been trying for 3 days already! lol… Cheers in addvance… ‘’ }


This is what my build folder looks like, those 3 files are missing?

output of cmake “configure” step please.

1 Like

Hi, thanks for a speedy reply, you mean the text from the config box in cmake?

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
Detected processor: AMD64
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2")
libjpeg-turbo: VERSION = 2.1.2, BUILD = opencv-4.5.5-libjpeg-turbo
Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
OpenJPEG: VERSION = 2.4.0, BUILD = opencv-4.5.5-openjp2-2.4.0
OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
at: E:/AI/OpenCV/build/3rdparty/ippicv/ippicv_win/icv
found Intel IPP Integration Wrappers sources: 2020.0.0
at: E:/AI/OpenCV/build/3rdparty/ippicv/ippicv_win/iw
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.

VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Allocator metrics storage type: 'long long'
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': E:/AI/OpenCV/opencv-4.5.5/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
imgcodecs: OpenEXR codec is disabled in runtime. Details:
highgui: using builtin backend: WIN32UI
Found 'misc' Python modules from E:/AI/OpenCV/opencv-4.5.5/modules/python/package/extra_modules
Found 'mat_wrapper;utils' Python modules from E:/AI/OpenCV/opencv-4.5.5/modules/core/misc/python/package
Found 'gapi' Python modules from E:/AI/OpenCV/opencv-4.5.5/modules/gapi/misc/python/package

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

    Timestamp:                   2022-01-11T19:36:18Z
    Host:                        Windows 10.0.19042 AMD64
    CMake:                       3.22.1
    CMake generator:             Visual Studio 17 2022
    CMake build tool:            E:/VS/IDE/MSBuild/Current/Bin/amd64/MSBuild.exe
    MSVC:                        1930
    Configuration:               Debug Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (18 files):         + SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (33 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

    Built as dynamic libs?:      YES
    C++ standard:                11
    C++ Compiler:                E:/VS/IDE/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe  (ver 19.30.30706.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MD /O2 /Ob2 /DNDEBUG 
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  E:/VS/IDE/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /MD /O2 /Ob2 /DNDEBUG 
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /MDd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /INCREMENTAL:NO 
    Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL 
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:
    3rdparty dependencies:

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

  Windows RT support:            NO

  GUI:                           WIN32UI
    Win32 UI:                    YES
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        build-libjpeg-turbo (ver 2.1.2-62)
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.2.0)
    JPEG 2000:                   build (ver 2.4.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.134.100)
      avformat:                  YES (58.76.100)
      avutil:                    YES (56.70.100)
      swscale:                   YES (5.9.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES
    Media Foundation:            YES
      DXVA:                      YES

  Parallel framework:            Concurrency

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2020.0.0 Gold [2020.0.0]
           at:                   E:/AI/OpenCV/build/3rdparty/ippicv/ippicv_win/icv
    Intel IPP IW:                sources (2020.0.0)
              at:                E:/AI/OpenCV/build/3rdparty/ippicv/ippicv_win/iw
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.19.1)

  OpenCL:                        YES (NVD3D11)
    Include path:                E:/AI/OpenCV/opencv-4.5.5/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            NO

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

  Install to:                    E:/AI/OpenCV/build/install

Configuring done

okay, that looks good. does the “generate” step finish okay? It should just say Generating done

1 Like

Thanks Man, for the love of god the Tutorial did not mention generating afterwards… problem solved… Thanks a million, sorry for wasteing your time like that…

1 Like

Hello, its me the noob again Sir… more problems!

So I have built everything and finished the project with their little snippit of test code… it works!!! Everything fine… Then I try to write my own code… major problems… in the first line… and any others I try to add the same problem…


Conffused and tired after 5 days of trying to get this to work… am I the only one that feels this useless… Help me obi wan kanobi… your my only hope! ‘’ }

Visual Studio usage question…

the error is non-specific. it might refer to that executable, or to a dll required by this executable.

if the exe isn’t there, it may be missing because the build (of the application) failed.

if the exe is elsewhere, VS should have looked there instead.

if the exe is there, this could mean a required dll is missing. then you need to mess around with the PATH environment variable. getting a changed environment variable to have an effect can require logging out of your windows session and logging in again (not just locking the session).

something to do with this report… weird how it works for the tutorial code, but not my code… hmmmm

main is there…


As I said, I dont understand how anycode I wright from his tutorial works, but the minute I try anything else it all goes south…