Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What compiler is in Visual Studio 2015

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?

like image 546
MaxDevelop Avatar asked Aug 07 '15 19:08

MaxDevelop


People also ask

Does Microsoft Visual Studio come with a compiler?

This is a truly high-end compiler and it also comes with Microsoft's Visual Studio IDE, which many people swear by.

Is Visual Studio A C++ compiler?

Visual Studio C/C++ IDE and Compiler for Windows.

Where is the Visual Studio compiler?

More precisely, the default path where you'll find the compiler is C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin . The compiler is cl.exe .


2 Answers

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++ 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 == 1910 (Visual Studio 2017)

Macros interpretation:

_MSVC_LANG : Defined as an integer literal that specifies the C++ language standard targeted by the compiler

_MSC_VER : contains the major and minor version numbers as an integer (e.g. "1500" is version 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_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)

like image 41
Dorin Avatar answered Sep 25 '22 12:09

Dorin


They have their own compiler that goes by Visual C++ _____

Here is a mapping of the IDE version to the compiler version. They generally release a major compiler version with each major IDE version.

IDE Version Compiler Version
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 2022 Visual C++ 14.3

So to explicitly answer your question, Visual Studio 2015 uses the compiler Visual C++ 14.0

like image 169
Cory Kramer Avatar answered Sep 22 '22 12:09

Cory Kramer