C++ Visual Studio 2015 中的编译器是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31885337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What compiler is in Visual Studio 2015
提问by MaxDevelop
Can anyone tell me what compiler is built-in to Visual Studio 2015 for C++ projects? I tried it and tried older version compilers and it's giving me other compiling results. Is it GNU C++ version 4.8.2 or a newer version?
谁能告诉我 Visual Studio 2015 为 C++ 项目内置了什么编译器?我尝试过并尝试过旧版本的编译器,它给了我其他编译结果。它是 GNU C++ 4.8.2 版还是更新的版本?
回答by Cory Kramer
They have their own compiler that goes by Visual C++ _____
他们有自己的编译器,使用 Visual C++ _____
Here is a mappingof the IDE version to the compiler version. They generally release a major compiler version with each major IDE version.
这是IDE 版本到编译器版本的映射。他们通常会随每个主要的 IDE 版本发布一个主要的编译器版本。
Visual Studio 2005 - Visual C++ 8.0
Visual Studio 2008 - Visual C++ 9.0
Visual Studio 2010 - Visual C++ 10.0
Visual Studio 2012 - Visual C++ 11.0
Visual Studio 2013 - Visual C++ 12.0
Visual Studio 2015 - Visual C++ 14.0
Visual Studio 2017 - Visual C++ 14.1
Visual Studio 2019 - Visual C++ 14.2
Visual Studio 2005中-的Visual C ++ 8.0
Visual Studio 2008中-的Visual C ++ 9.0
Visual Studio 2010中-的Visual C ++ 10.0
的Visual Studio 2012 -的Visual C ++ 11.0
的Visual Studio 2013 -的Visual C ++ 12.0
的Visual Studio 2015年-的Visual C ++ 14.0
的Visual Studio 2017年-的Visual C ++ 14.1
视觉Studio 2019 - Visual C++ 14.2
So to explicitly answer your question, Visual Studio 2015 uses the compiler Visual C++ 14.0
因此,为了明确回答您的问题,Visual Studio 2015 使用编译器 Visual C++ 14.0
回答by Dorin
You can get some useful information running this:
你可以得到一些有用的信息运行这个:
#include <stdio.h>
int main()
{
printf("_MSC_VER : %d \n", _MSC_VER);
printf("_MSC_FULL_VER : %d \n", _MSC_FULL_VER);
printf("_MSC_BUILD : %d \n", _MSC_BUILD);
#ifdef _MSVC_LANG
printf("_MSVC_LANG : C++%d \n", (_MSVC_LANG/100)%2000);
#endif
return 0;
}
Common MSVC versions:
常见的 MSVC 版本:
MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008)
MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008)
MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
MSVC++ 14.1 _MSC_VER == 1910 (Visual Studio 2017)
MSVC++ 14.1 _MSC_VER == 1910 (Visual Studio 2017)
Macros interpretation:
宏解释:
_MSVC_LANG: Defined as an integer literal that specifies the C++ language standard targeted by the compiler
_MSVC_LANG:定义为整数文字,指定编译器所针对的 C++ 语言标准
_MSC_VER: contains the major and minor version numbers as an integer (e.g. "1500" is version 15.00)
_MSC_VER:包含作为整数的主要和次要版本号(例如“1500”是版本 15.00)
_MSC_FULL_VER: contains the major version, minor version, and build numbers as an integer (e.g. "150020706" is version 15.00.20706)
_MSC_FULL_VER:包含主要版本、次要版本和内部版本号作为整数(例如“150020706”是版本 15.00.20706)
_MSC_BUILD: contains the revision number after the major version, minor version, and build numbers (e.g. "1" is revision 1, such as for 15.00.20706.01)
_MSC_BUILD: 在主要版本、次要版本和内部版本号之后包含修订号(例如“1”是修订版 1,例如 15.00.20706.01)
回答by yzt
The C/C++ compiler in Visual Studio is and always has been Microsoft C++ Compiler, built by Microsoft (not based on anything else.)
Visual Studio 中的 C/C++ 编译器一直是 Microsoft C++ 编译器,由 Microsoft 构建(不基于其他任何东西)。
Right now, this is how the compiler names itself:
现在,这是编译器命名自己的方式:
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026
Microsoft (R) C/C++ 优化编译器版本 19.00.23026
In VS2015, the compiler can target x86 and x64, as well as ARM. It supports almost all of C++11 and C99, and a large part of C++14, plus a little bit of the C++17 (or whenever) draft.
在 VS2015 中,编译器可以针对 x86 和 x64,以及 ARM。它支持几乎所有的 C++11 和 C99,以及大部分的 C++14,加上一点点 C++17(或任何时候)草案。
回答by 123iamking
Basically, Visual Studio 2015 supports compiler Visual C++ 14.0. But for more detail, you can track what features of C++ 14.0 has already been implemented here.
基本上,Visual Studio 2015 支持编译器 Visual C++ 14.0。但要了解更多详细信息,您可以在此处跟踪已实现 C++ 14.0 的哪些功能。
Also, I like Dorin's answer, he pointed out a wayto check compiler version with code.