# Installation Visual Studio 2022

**URL:** https://forum.opencv.org/t/installation-visual-studio-2022/7088
**Category:** C++
**Tags:** windows, build
**Created:** [January 11, 2022, 7:52pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088 "2022-01-11T19:52:51Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 11, 2022, 7:52pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/1 "2022-01-11T19:52:51Z")

</div>

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…

 ![img1](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/d/da56c7188a440ad0e58e24d2ed01ed292f2f5496.png)

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… ‘’ }

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 11, 2022, 7:53pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/2 "2022-01-11T19:53:52Z")

</div>

![img2](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/0/0edc17117ac1b26eb0fe2f483c771fb3a11b8bc2.png)

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

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [January 11, 2022, 7:57pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/3 "2022-01-11T19:57:38Z")

</div>

output of cmake “configure” step please.

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 11, 2022, 8:03pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/4 "2022-01-11T20:03:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 11, 2022, 8:10pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/5 "2022-01-11T20:10:36Z")

</div>

```nohighlight
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.

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
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: https://github.com/opencv/opencv/issues/21326
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

  Platform:
    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

  C/C++:
    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

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

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

Configuring done

```

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [January 11, 2022, 8:52pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/6 "2022-01-11T20:52:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 11, 2022, 8:56pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/7 "2022-01-11T20:56:29Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 13, 2022, 11:44am UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/8 "2022-01-13T11:44:20Z")

</div>

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…

![Untitled](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/3/350044a45aca3201f5738304a85c0df1e1690bd0.png)

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! ‘’ }

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [January 13, 2022, 12:49pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/9 "2022-01-13T12:49:23Z")

</div>

_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).

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 13, 2022, 5:00pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/10 "2022-01-13T17:00:56Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/b/b4a91f1a72b19723e507ce2e84a0ad277eb72db5.png)

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

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 13, 2022, 5:02pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/11 "2022-01-13T17:02:51Z")

</div>

main is there…

![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/f/f9d5b14afe85e4f57019be1945c76a392362d78a.png)

---

<div class="post-metadata">

### Author: ![Grayando](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Grayando](https://forum.opencv.org/u/Grayando)
#### Post date: [January 13, 2022, 5:26pm UTC](https://forum.opencv.org/t/installation-visual-studio-2022/7088/12 "2022-01-13T17:26:44Z")

</div>

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…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/b/bea8830b66ae2e02dfd930b410a836829f5fdeb7.png)
