更新一下(至2020.07)
说在前面的话
微软VS中,版本和组件版本到底有多少个说法,俺目前其实也很迷糊,所以这里只能给出个大概最粗略的信息,供大家参考。
在Opencv中,对vs的版本采取的是VS对应的尾号版本的方式,比如VS2019version16,那vc16就代表vs2019。是下面这样的关系,
VC版本号 VS对应版本
vc6 VC6.0
vc7 VS2002
vc7.1 VS2003
vc8 VS2005
vc9 VS2008
vc10 VS2010
vc11 VS2012
vc12 VS2013
vc13 VS2014
vc14 VS2015
vc15 VS2017
vc16 VS2019
这种版本标记大概相当于setup安装工具中可供选择的版本,标记方式是不一样的,比如安装时选择组件 MSVC v141。这个141可和vs2015没什么关系,估计是说编译器的版本。
先给出来源:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
https://omwtm.blog/2014/12/03/visual-studio-2013-version-numbers-and-updates/
大概是这个样子:
VC7: Visual studio.net
VC7.1: Visual studio 2003
VC8: Visual studio 2005
VC9: Visual studio 2008
VC10: Visual studio 2010
VC11: Visual studio 2012
VC12: Visual studio 2013
VC14: Visual studio 2015
VC14.1: Visual studio 2017 (估计微软是这么来的:VC14.10, 11, 12, 13, ...etc)
VC14.2: Visual studio 2019 (估计微软会这么来的:VC14.20, 21, 22, 23, ...etc)
如果要细究,子版本还有些子序列号
VS 2012 Version | Version ID |
Shell – RTM | 11.0.50727.1 |
Update 5 | 11.0.61219.00 |
VS 2013 Version | Version ID |
RTM | 12.0.21005.1 |
Update 1 | 12.0.30110.0 |
Update 2 | 12.0.30324.0 |
Update 3 | 12.0.30723.0 |
Update 4 | 12.0.31101.0 |
Update 5 | 12.0.40629.0 |
VS 2015 Version | Version ID |
RTM | 14.0.23107.0 |
Update 1 | 14.0.24720.00 |
Update 2 | 14.0.25123.00 |
Update 3 | 14.0.25420.10 |
微软的版本到底是咋来的,俺也不明就里,比如去其官网,找到的信息是这样的,
在官网上,最新的vs2019是这么宣传的,
参考地址:https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.3
The Visual Studio 2019 Blog is the official source of product insight from the Visual Studio Engineering Team. You can find in-depth information about the Visual Studio 2019 releases in the following posts:
显示的是这样的,
VC++ 2017 version 15.8 v14.15 toolset
VC++ 2017 version 15.9 v14.16 latest v141 tools
VC++ 2017 version 15.9 v14.16 Libs for Spectre (ARM)
VC++ 2017 version 15.9 v14.16 Libs for Spectre (ARM64)
VC++ 2017 version 15.9 v14.16 Libs for Spectre (x86 and x64)
VC++ 2017 版本 15.4 v14.11 工具集
VC++ 2017 版本 15.5 v14.12 工具集
VC++ 2017 版本 15.6 v14.13 工具集
显示得更多,
MSVC v140 - VS 2015 C++ 生成工具(v14.00)
MSVC v141 – VS 2017 C++ ARM Spectre 缓解库(v14.16)
MSVC v141 – VS 2017 C++ ARM 生成工具(v14.16)
MSVC v141 – VS 2017 C++ ARM64 Spectre 缓解库(v14.16)
MSVC v141 – VS 2017 C++ ARM64 生成工具(v14.16)
MSVC v141 – VS 2017 C++ x64/x86 Spectre 缓解库(v14.16)
MSVC v141 – VS 2017 C++ x64/x86 生成工具(v14.16)
MSVC v142 - VS 2019 C++ ARM build tools (v14.20)
MSVC v142 - VS 2019 C++ ARM Spectre 缓解库(v14.22)
MSVC v142 - VS 2019 C++ ARM Spectre-mitigated libs (v14.20)
MSVC v142 - VS 2019 C++ ARM 生成工具(v14.22)
MSVC v142 - VS 2019 C++ ARM64 build tools (v14.20)
MSVC v142 - VS 2019 C++ ARM64 Spectre-mitigated libs (v14.20)
MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.20)
MSVC v142 - VS 2019 C++ x64/x86 Spectre 缓解库(v14.21)
MSVC v142 - VS 2019 C++ x64/x86 Spectre-mitigated libs (v14.20)
MSVC v142 - VS 2019 C++ x64/x86 生成工具(v14.22)
MSVC v142 – VS 2019 C++ ARM Spectre 缓解库(v14.21)
MSVC v142 – VS 2019 C++ ARM 生成工具(v14.21)
MSVC v142 – VS 2019 C++ ARM64 Spectre 缓解库(v14.21)
MSVC v142 – VS 2019 C++ ARM64 Spectre 缓解库(v14.22)
MSVC v142 – VS 2019 C++ ARM64 生成工具(v14.21)
MSVC v142 – VS 2019 C++ ARM64 生成工具(v14.22)
MSVC v142 – VS 2019 C++ x64/x86 Spectre 缓解库(v14.22)
MSVC v142 – VS 2019 C++ x64/x86 生成工具(v14.21)
说实话这些子版本要弄清实在令人头大,还好用起来兼容性还可以。
最后我随便找了个别人的帖,大家自己看吧(很多帖子内容大同小异),
------=-----------------------------------------------=------------
CMake区分MSVC版本
https://www.cnblogs.com/coolbear/p/8438240.html
MSVC++ 4.x _MSC_VER == 1000
MSVC++ 5.0 _MSC_VER == 1100
MSVC++ 6.0 _MSC_VER == 1200
MSVC++ 7.0 _MSC_VER == 1300
MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio 2003)
MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005)
MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008)
MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
MSVC++ 14.1 _MSC_VER == 1911 (Visual Studio 2017)
if(MSVC)
if(CMAKE_CL_64)
set(OpenCV_ARCH x64)
set(OpenCV_TBB_ARCH intel64)
else()
set(OpenCV_ARCH x86)
set(OpenCV_TBB_ARCH ia32)
endif()
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)
endif()