HOME

TheInfoList



OR:

Microsoft Visual C++ (MSVC) is a compiler for the C, C++, C++/CLI and C++/CX
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s by
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
. MSVC is
proprietary software Proprietary software is computer software, software that grants its creator, publisher, or other rightsholder or rightsholder partner a legal monopoly by modern copyright and intellectual property law to exclude the recipient from freely sharing t ...
; it was originally a standalone product but later became a part of Visual Studio and made available in both
trialware Shareware is a type of proprietary software that is initially shared by the owner for trial use at little or no cost. Often the software has limited functionality or incomplete documentation until the user sends payment to the software developer. ...
and freeware forms. It features tools for developing and
debugging In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
C++ code, especially code written for the
Windows API The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
,
DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct" ...
and
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
. Many applications require redistributable Visual C++ runtime library packages to function correctly. These packages are frequently installed separately from the applications they support, enabling multiple applications to use the package with only a single installation. These Visual C++ redistributable and runtime packages are mostly installed for standard
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
that many applications use."Do I need these Microsoft Visual C++ redistributables?"
Ask Leo!. Retrieved 2012-11-18.


History

The predecessor to Visual C++ was called ''Microsoft C/C++''. There was also a ''Microsoft QuickC'' 2.5 and a ''Microsoft QuickC for Windows'' 1.0. The Visual C++
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
is still known as ''Microsoft C/C++'' and as of the release of Visual C++ 2015 Update 2, is on version 14.0.23918.0.


16-bit versions

* Microsoft C 1.0, based on Lattice C, was Microsoft's first C product in 1983. It was not K&R C compliant. * C 2.0 added large model support, allowing up to 1MiB for both the Code Segment and Data Segment. * C 3.0 was the first version developed inside Microsoft. This version intended compatibility with K&R and the later ANSI standard. It was being used inside Microsoft (for
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
Xenix Xenix is a discontinued Unix operating system for various microcomputer platforms, licensed by Microsoft from AT&T Corporation. The first version was released in 1980, and Xenix was the most common Unix variant during the mid- to late-1980s. T ...
development) in early 1984. It shipped as a product in 1985. * C 4.0 added optimizations and CodeView, a source-level debugger. * C 5.0 added loop optimizations and huge memory model (
arrays An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
bigger than 64 KB) support. * C 5.1 released in 1988 allowed compiling programs for OS/2 1.x. The fourteen 5.25" disk (two of which were 1.2 MB, the others 360k) version included QuickC. The eleven 720k 3.5" disk version included with the OS/2 Software Development Kit included MASM 5.1 (a single executable that worked under both MSDOS and OS/2 1.x). * C 6.0 released in 1989 added support for tiny memory model and better support for the ANSI C89 standard (the documentation explicitly says that it is not 100% compliant but it appears to be close enough for practical purposes). It added the ''Programmer's Workbench'' IDE, global flow analysis, a source browser, and a new debugger. To the surprise of many, C++ was not included even though competitors already had offerings. * C/C++ 7.0 was released in 1992. Dropped OS/2 support. Compilation required a 386 processor plus the included DOS extender, 386MAX, though for users to be able to target DOS extenders in their own programs they write, one of several later-released third-party tools was required. Added built-in support for C++ and MFC (Microsoft Foundation Class Library) 1.0. * Visual C++ 1.0, which included MFC 2.0, was the first version of "Visual" C++, released in February 1993. It was Cfront 2.1 compliant and available in two editions: ** Standard: replaced QuickC for Windows. ** Professional: replaced C/C++ 7.0. Included the ability to build both DOS and Windows applications, an optimizing compiler, a source profiler, and the Windows 3.1 SDK. The
Phar Lap Phar Lap (4 October 1926 – 5 April 1932) was a New Zealand-born champion Australian Thoroughbred horse racing, racehorse. Achieving great success during his distinguished career, his initial underdog status gave people hope during the ear ...
286 DOS Extender Lite was also included. * Visual C++ 1.5 was released in December 1993, included MFC 2.5, and added OLE 2.0 and
ODBC In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. An ...
support to MFC. It was the first version of Visual C++ that came only on
CD-ROM A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains computer data storage, data computers can read, but not write or erase. Some CDs, called enhanced CDs, hold b ...
. ** Visual C++ 1.51 and 1.52 were available as part of a subscription service. ** Visual C++ 1.52b is similar to 1.52, but does not include the Control Development Kit. ** Visual C++ 1.52c was a patched version of 1.5. It is the last, and arguably most popular, development platform for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
3.x. It is available through Microsoft Developer Network.


Strictly 32-bit versions

* Visual C++ 1.0 (original name: Visual C++ 32-bit Edition) released in 1993 was the first version for
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in a maximum of 32- bit units. Compared to smaller bit widths, 32-bit computers can perform la ...
development (and requiring 32-bit Windows NT as a host) for the
Intel 386 The Intel 386, originally released as the 80386 and later renamed i386, is the third-generation x86 architecture microprocessor from Intel. It was the first 32-bit processor in the line, making it a significant evolution in the x86 architect ...
architecture. Although released when
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
version 1.5 was available, it did not include support for OLE2 and ODBC. It was also available in a bundle called Visual C++ 16/32-bit Suite, which included Visual C++ 1.5. * Visual C++ 2.0, which included MFC 3.0, was the first version to be 32-bit only. In many ways, this version was ahead of its time, since
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft and the first of its Windows 9x family of operating systems, released to manufacturing on July 14, 1995, and generally to retail on August 24, 1995. Windows 95 merged ...
, then codenamed "Chicago", was not yet released, and
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
had only a small market share. Microsoft included and updated Visual C++ 1.5 as part of the 2.x releases up to 2.1, which included Visual C++ 1.52, and both 16-bit and 32-bit version of the Control Development Kit (CDK) were included. Visual C++ 2.x also supported
Win32s Win32s is a 32-bit application runtime environment for the Microsoft Windows 3.1 and 3.11 operating systems. It allowed some 32-bit applications to run on the 16-bit operating system using call thunks. A beta version of Win32s was available in ...
development. It is available through Microsoft Developer Network. There was a Visual C++ 2.0 RISC Edition for MIPS and
Alpha Alpha (uppercase , lowercase ) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter ''aleph'' , whose name comes from the West Semitic word for ' ...
processors, as well as a cross-platform edition for the
Macintosh Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
(
68000 The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector ...
instruction set). ** Microsoft Visual C++ Cross-Development Edition for the Macintosh was an add-on for Visual C++ that introduced the Windows Portability Library, originally known as Windows Library for Macintosh or Windows Layer for the Macintosh (WLM), allowing developers to write applications against the Win32 and MFC APIs that could be compiled for 68000 architecture Macintosh computers. ** Visual C++ 2.1 and 2.2 were updates for 2.0 available through subscription. * Visual C++ 4.0, released on 1995-12-11, introduced the Developer Studio IDE. Its then-novel tiled layout of non-overlapping panels—navigation panel, combination editor/source level debugger panel, and console output panel—continues through the Visual Studio product line (as of 2013). Visual C++ 4.0 included MFC 4.0, was designed for Windows 95 and Windows NT. To allow support of legacy (Windows 3.x/DOS) projects, 4.0 came bundled with the Visual C++ 1.52 installation CD. Updates available through subscription included Visual C++ 4.1, which came with the Microsoft Game SDK (later released separately as the DirectX SDK), and Visual C++ 4.2. Version number 3.0 was skipped to achieve version number parity between Visual C++ 4.0 and MFC 4.0. * Visual C++ 4.2 did not support Windows 3.x (
Win32s Win32s is a 32-bit application runtime environment for the Microsoft Windows 3.1 and 3.11 operating systems. It allowed some 32-bit applications to run on the 16-bit operating system using call thunks. A beta version of Win32s was available in ...
) development. This was the final version with a cross-platform edition for the Mac available and it differed from the 2.x version in that it also allowed compilation for the
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
instruction set. * Visual C++ 5.0 (bundled with Visual Studio 97) which included MFC 4.21 and was released 1997-04-28, was a major upgrade from 4.2. Available in four editions: Learning, Professional, Enterprise, and RISC. * Visual C++ 6.0 (commonly known as VC6, and available standalone in Standard, Professional and Enterprise editions, as well as bundled with Visual Studio 6.0), which included MFC 6.0, was released in 1998. The release was somewhat controversial since it did not include an expected update to MFC. Visual C++ 6.0 is still quite popular and often used to maintain legacy projects. There are, however, issues with this version under Windows XP, especially under the debugging mode (for example, the values of static variables do not display). The debugging issues can be solved with a patch called the "Visual C++ 6.0 Processor Pack". Version number: 12.00.8804 * Visual C++ .NET 2002 (also known as Visual C++ 7.0), which included MFC 7.0, was released in 2002 with support for link time code generation and debugging runtime checks, .NET 1.0, and Visual C# and Managed C++. The new user interface used many of the hot keys and conventions of
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic (classic), the original Visual Basic suppo ...
, which accounted for some of its unpopularity among C++ developers. Version number: 13.00.9466 * Visual C++ .NET 2003 (also known as Visual C++ 7.1), which included MFC 7.1, was released in 2003 along with .NET 1.1 and was a major upgrade to Visual C++ .NET 2002, and was the first version to support the C99 "long long" construct. It was considered a patch to Visual C++ .NET 2002. Accordingly, the English language upgrade version of Visual Studio .NET 2003 shipped for minimal cost to owners of the English-language version of Visual Studio .NET 2002. Windows 98 is the lowest officially supported version. Although simple programs will work on Windows 95 and NT 4.0, more complex programs may cause things like ws2_32.dll to be referenced, or functions missing in kernel32.dll. In later versions (Visual C++ 2005) of the compiler even simple programs won't work (unless you replace the C library) because they have a reference to function IsDebuggerPresent in kernel32.dll which only exists in Windows 98 and later. Version number: 13.10.3077 * eMbedded Visual C++ in various versions was used to develop for some versions of the Windows CE operating system. Initially it replaced a development environment consisting of tools added onto Visual C++ 6.0. eMbedded Visual C++ was replaced as a separate development environment by Microsoft Visual Studio 2005.


32-bit and 64-bit versions

* Visual C++ 2005 (also known as Visual C++ 8.0), which included MFC 8.0, was released in November 2005. This version supports .NET 2.0 and includes a new version of C++ targeted to the .NET framework ( C++/CLI) with the purpose of replacing the previous version ( Managed C++). Managed C++ for CLI is still available via compiler options, though. It also introduced
OpenMP OpenMP is an application programming interface (API) that supports multi-platform shared-memory multiprocessing programming in C, C++, and Fortran, on many platforms, instruction-set architectures and operating systems, including Solaris, ...
. With Visual C++ 2005, Microsoft also introduced Team Foundation Server. Visual C++ 8.0 has problems compiling MFC AppWizard projects that were created using Visual Studio 6.0, so maintenance of legacy projects can be continued with the original IDE if rewriting is not feasible. Visual C++ 2005 is the last version able to target
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It was the second operating system in the 9x line, as the successor to Windows 95. It was Software ...
and
Windows Me Windows Me (Millennium Edition) is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It was the successor to Windows 98, and was released to manufacturing on June 19, 2000, and t ...
. SP1 version (14.00.50727.762) is also available in Microsoft Windows SDK Update for Windows Vista. * Visual C++ 2008 (also known as Visual C++ 9.0) was released in November 2007. This version supports .NET 3.5. Managed C++ for CLI is still available via compiler options. By default, all applications compiled against the Visual C++ 2008 Runtimes (static and dynamic linking) will only work on Windows 2000, Windows XP SP2 and later. A feature pack released for VC9, later included in SP1, added support for C++ TR1 library extensions. SP1 version (15.00.30729.01) is also available in Microsoft Windows SDK for Windows 7. * Some versions of Visual C++ supported Itanium 2. * Visual C++ 2010 (also known as Visual C++ 10.0) was released on April 12, 2010. It uses a SQL Server Compact database to store information about the source code, including IntelliSense information, for better IntelliSense and code-completion support. However, Visual C++ 2010 does not support Intellisense for C++/CLI. This version adds a C++
parallel computing Parallel computing is a type of computing, computation in which many calculations or Process (computing), processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. ...
library called the Parallel Patterns Library, partial support for
C++11 C++11 is a version of a joint technical standard, ISO/IEC 14882, by the International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC), for the C++ programming language. C++11 replaced the prior vers ...
, significantly improved IntelliSense based on the Edison Design Group front end, and performance improvements to both the compiler and generated code. This version is built on .NET 4.0, but supports compiling to
machine code In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
. The partial C++11 support mainly consists of six compiler features: lambdas, rvalue references, auto, decltype, static_assert, and nullptr. C++11 also supports library features (e.g., moving the TR1 components from std::tr1 namespace directly to std namespace). Variadic templates were also considered, but delayed until some future version due to having a lower priority, which stemmed from the fact that, unlike other costly-to-implement features (lambda, rvalue references), variadic templates would benefit only a minority of library writers rather than the majority of compiler end users. By default, all applications compiled against Visual C++ 2010 Runtimes only work on Windows XP SP2 and later. The RTM version (16.00.30319) is also available in Windows SDK for Windows 7 and .NET Framework 4 (WinSDK v7.1). SP1 version (16.00.40219) is available as part of Visual Studio 2010 Service Pack 1 or through the Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1. * Visual C++ 2012 (also known as Visual C++ 11.0) was released on August 15, 2012. It features improved C++11 support, and support for Windows Runtime development. * Visual C++ 2013 (also known as Visual C++ 12.0) was released on October 17, 2013. It features further C++11 and C99 support, and introduces a
REST REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of ...
SDK. * Visual C++ 2015 (also known as Visual C++ 14.0) was released on July 20, 2015. It features improved C++11/14/17 support. Without any announcement from Microsoft, Visual Studio 2015 Update 2 started generating telemetry calls in compiled binaries. After some users contacted Microsoft about this problem, Microsoft said they would remove these telemetry calls when compiling with the future Visual Studio 2015 Update 3. The function in question was removed from the Visual C++ CRT static libraries in Visual Studio 2015 Update 3. * Visual C++ 2017 (also known as Visual C++ 14.1) was released on March 7, 2017. * Visual C++ 2019 (also known as Visual C++ 14.20) was released on April 2, 2019. * Visual C++ 2022 (also known as Visual C++ 14.30) was released on November 8, 2021.


Internal version numbering

There are several different version numbers to consider when working with Visual C or C++. The oldest and most original of these is the compiler version number, which has been monotonically increased since the early Microsoft C compiler days. This is the version returned by running the command cl.exe on its own without any options. By taking two digits after the decimal and dropping the decimal point, this also becomes the value of the C pre-processor macro: _MSC_VER, and the CMake variable: MSVC_VERSION. A longer version of the C macro is _MSC_FULL_VER to make more finely-grained distinctions between builds of the compiler. An example of _MSC_VER is 1933 to represent version 19.33 of the Microsoft C/C++ compiler, and of _MSC_FULL_VER is 193331630. The Visual product version, such as "17.3.4", designates the version of Visual Studio with which version 19.33 of the compiler was packaged. Then there is the Microsoft Visual C/C++ Runtime Library version, e.g. "14.3". From this, one can also deduce the toolset version, which can be obtained by taking the first three digits of the runtime library version and dropping the decimal, e.g. "143". It includes the Visual C/C++ runtime library, as well as compilers, linkers, assemblers, other build tools, and matching libraries and header files. The following is a (scrapeable) table of the known correlated version numbers.


Compatibility


ABI

The Visual C++ compiler ABI has historically changed between major compiler releases. This is especially the case for STL containers, where container sizes have varied a lot between compiler releases. Microsoft therefore recommends against using C++ interfaces at module boundaries when one wants to enable client code compiled using a different compiler version. Instead of C++, Microsoft recommends using C or COM interfaces, which are designed to have a stable ABI between compiler releases. All 14.x MSVC releases have a stable ABI, and binaries built with these versions can be mixed in a forwards-compatible manner, noting the following restrictions: * The toolset version used must be equal to or higher than the highest toolset version used to build any linked binaries. * The MSVC Redistributable version must be equal to or higher than the toolset version used by any application component. * Static libraries or object files compiled with /GL (Whole program optimisation) are not binary compatible between versions and must use the exact same toolset.


C runtime libraries

Visual C++ ships with different versions of C runtime libraries.C Run-Time Libraries
/ref> This means users can compile their code with any of the available libraries. However, this can cause some problems when using different components ( DLLs,
EXE Exe or EXE may refer to: * .exe, a file extension * exe., abbreviation for Executive (disambiguation)#Role, title, or function, executive Places * River Exe, in England * Exe Estuary, in England * Exe Island, in Exeter, England Transportation a ...
s) in the same program. A typical example is a program using different
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
. The user should use the same C Run-Time for all the program's components unless the implications are understood. Microsoft recommends using the multithreaded, dynamic link library (/MD or /MDd compiler option) to avoid possible problems.


POSIX

Although Microsoft's CRT implements a large subset of
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
interfaces, the Visual C++ compiler will emit a warning on ''every'' use of such functions by default. The rationale is that C and C++ standards require an underscore prefix before implementation-defined interfaces, so the use of these functions are non-standard. However, systems that are actually POSIX-compliant would not accept these underscored names, and it is more portable to just turn off the warning instead.


C

Although the product originated as an IDE for the C programming language, for many years the compiler's support for that language conformed only to the original edition of the C standard, dating from 1989, but not the C99 revision of the standard. There had been no plans to support C99 even in 2011, more than a decade after its publication. Visual C++ 2013 finally added support for various C99 features in its C mode (including designated initializers, compound literals, and the _Bool type), though it was still not complete. Visual C++ 2015 further improved the C99 support, with full support of the C99 Standard Library, except for features that require C99 language features not yet supported by the compiler. Most of the changes from the C11 revision of the standard were still not supported by Visual C++ 2017. For example, generic selections via the _Generic keyword are not supported by the compiler and result in a syntax error. The preprocessor was overhauled in 2018, with C11 in sight: _Generic support has been committed to MSVC as of February 2020. In September 2020, Microsoft announced C11 and C17 standards support in MSVC would arrive in version 16.8. This did not include optional features but Microsoft indicated that they were planning to add support for atomics and threads at a later date. In version 17.5, partial (since atomic locks are missing) and experimental (meaning hidden behind the compiler flag /experimental:c11atomics) support for atomics was added and in version 17.8, support for threads was added, this time not behind a compiler flag.


C++

With default settings MSVC does not do two-phase name lookup which prevents it from flagging a wide range of invalid code. Most checks are deferred to template instantiation. More recent versions remedy this behavior, but it needs to be enabled by the command-line option /permissive-.


Reception

Describing it as "excellent", ''
BYTE The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
'' in February 1989 approved of Microsoft C 5.1's OS/2 support, QuickC for interactive development, and CodeView debugger. Although Watcom C produced slightly faster code, the magazine said that developers "might still prefer Microsoft's friendlier and more powerful tools".


References


Further reading

* *


External links

*
C++ Tools and Features in Visual Studio Editions

Microsoft C++ Build Tools

C9::GoingNative
on Microsoft Channel 9 {{Authority control 1993 software C (programming language) compilers C++ compilers Integrated development environments Visual C++ C++