# Troubles installing OpenCV 4.x on Windows

**URL:** <https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025>\
**Category:** Uncategorized\
**Tags:** windows, build, cmake\
**Created:** [May 2, 2023, 9:22am UTC](https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025 "2023-05-02T09:22:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dnn/32/7807_2.png) [@dnn](https://forum.opencv.org/u/dnn)\
**Post date:** [May 2, 2023, 9:22am UTC](https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025/1 "2023-05-02T09:22:25Z")

</div>

Hello,

I am trying to install OpenCV library on Windows and I was following this tuttorial:  
[OpenCV: Installation in Windows](https://docs.opencv.org/4.x/d3/d52/tutorial_windows_install.html) .  
CMake passed successfully after deselecting few packages to install but I don’t see any solution file for MS Visual Studio. Could you give me some advise?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [May 2, 2023, 9:43am UTC](https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025/2 "2023-05-02T09:43:05Z")

</div>

Did you both **Configure** and **Generate** the CMake files from the GUI without any errors?

---

<div class="post-metadata">

**Author:** ![dnn](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dnn/32/7807_2.png) [@dnn](https://forum.opencv.org/u/dnn)\
**Post date:** [May 2, 2023, 11:08am UTC](https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025/3 "2023-05-02T11:08:29Z")

</div>

I didn’t click on Generate. I guess this is the problem for now. Thanks!

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [May 2, 2023, 12:18pm UTC](https://forum.opencv.org/t/troubles-installing-opencv-4-x-on-windows/13025/4 "2023-05-02T12:18:03Z")

</div>

try to delete `build/CmakeCache.txt`,  
and re-run cmake(-gui) from scratch.

first thing it does, is ask (there are boxes !) about your compiler
