一些编译器版本的_MSC_VER值
VC++编译器的版本号
1 2 3 4 5 6 7 8 9 10 11
| MS VC++ 15.0 _MSC_VER = 1910 (Visual Studio 2017) MS VC++ 14.0 _MSC_VER = 1900 (Visual Studio 2015) MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012) MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio 2003) MSVC++ 7.0 _MSC_VER == 1300 (VisualStudio .NET) MSVC++ 6.0 _MSC_VER == 1200 (VisualStudio 98) MSVC++ 5.0 _MSC_VER == 1100 (VisualStudio 97)
|
关于编译器版本号的查看,需要说名的是:这里的版本号并不是指在“Microsoft Visual Studio——Help——About”里的“Version”的值,这个版本号是指Visual Studio的版本号,而不是VC++编译器的版本号,VC++编译器在Visual Studio里面是指“cl.exe”程序,该程序才是编译C++代码的真正编译器,如查看“cl.exe”的版本号,以在WIndows 7查看VC 2005的“cl.exe”的版本号为例,“开始——所有程序——Microsoft Visual Studio 2005——Visual Studio Tools——Visual Studio 2005 Command Prompt”进入VC++ 2005命令行,运行“**cl /?**”,将会看到如下的信息:
1 2
| Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
|
Microsoft Visual C++可查看全部的版本号
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| MSC 2.0 _MSC_VER == 200 MSC 3.0 _MSC_VER == 300 MSC 4.0 _MSC_VER == 400 MSC 5.0 _MSC_VER == 500 MSC 6.0 _MSC_VER == 600 MSC 7.0 _MSC_VER == 700 MSVC++ 1.0 _MSC_VER == 800 MSVC++ 2.0 _MSC_VER == 900 MSVC++ 4.0 _MSC_VER == 1000 (Developer Studio 4.0) MSVC++ 4.2 _MSC_VER == 1020 (Developer Studio 4.2) MSVC++ 5.0 _MSC_VER == 1100 (Visual Studio 97 version 5.0) MSVC++ 6.0 _MSC_VER == 1200 (Visual Studio 6.0 version 6.0) MSVC++ 7.0 _MSC_VER == 1300 (Visual Studio .NET 2002 version 7.0) MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio .NET 2003 version 7.1) MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005 version 8.0) MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008 version 9.0) MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010 version 10.0) MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012 version 11.0) MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013 version 12.0) MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015 version 14.0) MSVC++ 14.1 _MSC_VER == 1910 (Visual Studio 2017 version 15.0) MSVC++ 14.11 _MSC_VER == 1911 (Visual Studio 2017 version 15.3) MSVC++ 14.12 _MSC_VER == 1912 (Visual Studio 2017 version 15.5) MSVC++ 14.13 _MSC_VER == 1913 (Visual Studio 2017 version 15.6) MSVC++ 14.14 _MSC_VER == 1914 (Visual Studio 2017 version 15.7) MSVC++ 14.15 _MSC_VER == 1915 (Visual Studio 2017 version 15.8) MSVC++ 14.16 _MSC_VER == 1916 (Visual Studio 2017 version 15.9) MSVC++ 14.2 _MSC_VER == 1920 (Visual Studio 2019 Version 16.0) MSVC++ 14.21 _MSC_VER == 1921 (Visual Studio 2019 Version 16.1) MSVC++ 14.22 _MSC_VER == 1922 (Visual Studio 2019 Version 16.2) MSVC++ 14.23 _MSC_VER == 1923 (Visual Studio 2019 Version 16.3) MSVC++ 14.24 _MSC_VER == 1924 (Visual Studio 2019 Version 16.4)
|