# Building from source on Windows 10

**URL:** <https://forum.opencv.org/t/building-from-source-on-windows-10/6524>\
**Category:** C++\
**Tags:** windows, build, cmake\
**Created:** [December 1, 2021, 5:10pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524 "2021-12-01T17:10:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![penny](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@penny](https://forum.opencv.org/u/penny)\
**Post date:** [December 1, 2021, 5:10pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/1 "2021-12-01T17:10:46Z")

</div>

Hi,  
I am attempting to build OpenCV from the sources using Windows 10 and Visual Studio 2022 c++ 17.  
I have followed the instructions from the OpenCV website. I have installed python, cmake and no end of other stuff. When I click “configure” in cmake there is an error and the cmake output log says “The system is: Windows - 10.0.19044 - AMD64”

I have scoured the internet and I cannot find any guidance as to what the issue might be.

Is anyone able to shed any light.  
Many 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:** [December 1, 2021, 5:30pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/2 "2021-12-01T17:30:41Z")

</div>

> [@penny](#):
>
> When I click “configure” in cmake there is an error and the cmake output log says “The system is: Windows - 10.0.19044 - AMD64”

please show us the error 😉

---

<div class="post-metadata">

**Author:** ![penny](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@penny](https://forum.opencv.org/u/penny)\
**Post date:** [December 1, 2021, 5:59pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/3 "2021-12-01T17:59:15Z")

</div>

Not sure there is anything more to add.  
Would you like to be more specific.  
Thanks.

---

<div class="post-metadata">

**Author:** ![penny](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@penny](https://forum.opencv.org/u/penny)\
**Post date:** [December 1, 2021, 6:53pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/4 "2021-12-01T18:53:27Z")

</div>

“Error in configuration process, project files may be invalid”

---

<div class="post-metadata">

**Author:** ![penny](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@penny](https://forum.opencv.org/u/penny)\
**Post date:** [December 1, 2021, 6:54pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/5 "2021-12-01T18:54:48Z")

</div>

I found additional text…

CMake Error at CMakeLists.txt:113 (enable\_language):  
Generator

```
Visual Studio 17 2022

```

could not find any instance of Visual Studio.

Configuring incomplete, errors occurred!  
See also “X:/OpenCV/build/CMakeFiles/CMakeOutput.log”.

I have Visual Studio 2022 installed and it works fine.

---

<div class="post-metadata">

**Author:** ![penny](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@penny](https://forum.opencv.org/u/penny)\
**Post date:** [December 1, 2021, 10:36pm UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/6 "2021-12-01T22:36:22Z")

</div>

I think the installer for Visual Studio 2022 is a bit funky.  
I went into the Installer to ensure I had the right modules and it said I did not have a version of VS2022 installed which is really weird because I was using it just fine.  
So I reinstalled VS2022 and then I could not compile a project because it could not find windows.h \>mega funky.  
So I reinstalled VS2022 a third time, I could compile my c++ projects and now cmake seemed to work fine.  
I built OpenCV using cmake and I was able to open OpenCV as an sln and I am currently compiling it within VS2022.  
Such my life!!

---

<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 24, 2022, 11:46am UTC](https://forum.opencv.org/t/building-from-source-on-windows-10/6524/7 "2022-01-24T11:46:49Z")

</div>

Split this topic on January 24, 2022, 11:46am UTC

A post was split to a new topic: [Any cool builds with Iphones?](https://forum.opencv.org/t/any-cool-builds-with-iphones/7255)
