I am trying to configure cmake with a VisualStudio 2022 compiler in order to be able to set de openCV library. But it seems that is not posible because of the MSVC_VERSION “1932”. It look like because of that, the program can not set OpenCV_RUNTIME, so the configuration can’t be done.
On the other side, I also have an error that it says “Unknown arguments specified”. I don’t really know what is this meaning.
I al
Your screenshot is obviously a silly and bad idea for posting text - illegible, can not be searched, not accessible.
Surely you googled about this and found this about tailoring compiler checks:
opened 06:17AM - 07 Aug 19 UTC
closed 07:03AM - 07 Aug 19 UTC
invalid
<!--
If you have a question rather than reporting a bug please go to http://ans… wers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
Please:
* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->
- OpenCV => 3.4
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2019
##### Detailed description
I use cmake to build opencv 3.4, and there is a warning about OpenCV_RUNTIME.
```
CMake Warning at cmake/OpenCVDetectCXXCompiler.cmake:147 (message):
OpenCV does not recognize MSVC_VERSION "1921". Cannot set OpenCV_RUNTIME
Call Stack (most recent call first):
CMakeLists.txt:157 (include)
```
I check the file OpenCVDetectCXXCompiler.cmake, and in line 132-148.
```
if(MSVC_VERSION EQUAL 1400)
set(OpenCV_RUNTIME vc8)
elseif(MSVC_VERSION EQUAL 1500)
set(OpenCV_RUNTIME vc9)
elseif(MSVC_VERSION EQUAL 1600)
set(OpenCV_RUNTIME vc10)
elseif(MSVC_VERSION EQUAL 1700)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(OpenCV_RUNTIME vc15)
else()
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
endif()
```
Can I just add MSVC_VERSION 1921 like this, or something else?
```
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
set(OpenCV_RUNTIME vc16)
```
##### Steps to reproduce
<!-- to add code example fence it with triple backticks and optional file extension
```.cpp
// C++ code example
```
or attach as .txt or .zip file
-->
berak
October 22, 2022, 9:23am
3
doesn’t it simply mean, that there’s no support for VisualStudio 2022
(aka MSVC 1832) yet ?
what version of opencv source do you use? MRE (the usual info) is required .
this should have worked, if you didn’t use an outdated version .
committed 11:46AM - 07 Oct 21 UTC
further, that error message can ONLY come from “line 124” if the revision was from early 2018 or before.
you are using ancient versions of OpenCV.
if you expect support, use a current version. you are wasting everyone’s time making us deal with something that was fixed years ago.
further, if you have to cross-post, at least also link to your question on other platforms.
you are wasting everyone’s time (once more) when there’s already a correct answer.