Building from source on Windows 10

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.

please show us the error :wink:

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

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

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.

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!!

1 Like

A post was split to a new topic: Any cool builds with Iphones?