[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

Microsoft Visual C++ - Wikipedia

Visual C++
Developer(s)Microsoft
Initial releaseFebruary 1993; 28 years ago[1]
Stable release

14.29.30133 / July 27, 2021

Written inC++[2]
Operating systemWindows
PlatformIA-32, x86-64 and ARM
Available inEnglish, Chinese (Simplified & Traditional), Czech, French, German, Italian, Japanese, Korean, Polish, Portuguese (Brazilian), Russian, Spanish, Turkish
TypeIDE
LicenseTrialware and freeware
Websitedocs.microsoft.com/en-us/cpp/

Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both trialware and freeware forms. It features tools for developing and debugging C++ code, especially code written for the Windows API, DirectX and .NET.

Many applications require redistributable Visual C++ runtime library packages to function correctly. These packages are often installed independently of applications, allowing multiple applications to make use of the package while only having to install it once. These Visual C++ redistributable and runtime packages are mostly installed for standard libraries that many applications use.[3]

History[edit]

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 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[citation needed].

16-bit versions[edit]

Strictly 32-bit versions[edit]

32-bit and 64-bit versions[edit]

Strictly 64-bit versions[edit]

Internal version numbering[edit]

The predefined macro _MSC_VER indicates the major and minor version numbers of the Visual C++ compiler. The macro's value is an integer literal in which the last two digits indicate the minor version number and the preceding digits indicate the major version number.

From Visual Studio 2017, _MSC_VER is incremented monotonically at every Visual C++ toolset update. Thus, for example, the version of | 14.11 that ships with Visual Studio 2017 version 15.3.0 sets _MSC_VER to 1911. Microsoft recommends using the >= operator to test the value of _MSC_VER.

Here are the values of _MSC_VER for various versions of Visual C++:

MSC versions
MSC version _MSC_VER
1.0 100
2.0 200
3.0 300
4.0 400
5.0 500
6.0 600
7.0 700
MSVC++ versions
MSVC++ version _MSC_VER
1.0 800
2.0 900
4.0 1000 (Developer Studio 4.0)
4.2 1020 (Developer Studio 4.2)
5.0 1100 (Visual Studio 5.0)
6.0 1200 (Visual Studio 6.0)
7.0 1300 (Visual Studio 2002 7.0)
7.1 1310 (Visual Studio 2003 7.1)
8.0 1400 (Visual Studio 2005 8.0)
9.0 1500 (Visual Studio 2008 9.0)
10.0 1600 (Visual Studio 2010 10.0)
11.0 1700 (Visual Studio 2012 11.0)
12.0 1800 (Visual Studio 2013 12.0)
14.0 1900 (Visual Studio 2015 14.0)
14.1 1910 (Visual Studio 2017 15.0)
14.11 1911 (Visual Studio 2017 15.3)
14.12 1912 (Visual Studio 2017 15.5)
14.13 1913 (Visual Studio 2017 version 15.6)
14.14 1914 (Visual Studio 2017 version 15.7)
14.15 1915 (Visual Studio 2017 version 15.8)
14.16 1916 (Visual Studio 2017 version 15.9)
14.2 1920 (Visual Studio 2019 Version 16.0)
14.21 1921 (Visual Studio 2019 Version 16.1)
14.22 1922 (Visual Studio 2019 Version 16.2)
14.23 1923 (Visual Studio 2019 Version 16.3)
14.24 1924 (Visual Studio 2019 Version 16.4)
14.25 1925 (Visual Studio 2019 Version 16.5)
14.26 1926 (Visual Studio 2019 Version 16.6)
14.27 1927 (Visual Studio 2019 Version 16.7)
14.28 1928 (Visual Studio 2019 Version 16.8 + 16.9)
14.29 1929 (Visual Studio 2019 Version 16.10 + 16.11)
14.3 1930 (Visual Studio 2022 Version 17.0)
14.31 1931 (Visual Studio 2022 Version 17.1)


These version numbers refer to the major version number of the Visual C++ compilers and libraries, as can be seen from the installation directories. It does not refer to the year in the name of the Visual Studio release. A thorough list is available.[47][48]

Note that the C++ compiler executable version matches _MSC_VER and is different from the version of the Visual C++ product as a whole. For example the cl.exe included in 14.22 (Visual Studio 2019 16.2.5) reports its version as 19.22.27905 if run without arguments.

There is also a _MSC_FULL_VER value, defined since 1200, for extra information about the build number.

Compatibility[edit]

ABI[edit]

The Visual C++ compiler ABI have historically changed between major compiler releases.[49] This is especially the case for STL containers, where container sizes have varied a lot between compiler releases.[50] 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[51] or COM[52] interfaces, which are designed to have a stable ABI between compiler releases.

All 14.x MSVC releases have a stable ABI,[53] and binaries built with these versions can be mixed in a forwards-compatible manner, noting the following restrictions:

C runtime libraries[edit]

Visual C++ ships with different versions of C runtime libraries.[54] This means users can compile their code with any of the available libraries. However, this can cause some problems when using different components (DLLs, EXEs) in the same program. A typical example is a program using different libraries. 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.[54]

POSIX[edit]

Although Microsoft's CRT implements a large subset of POSIX 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.[55] 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[edit]

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.[56]

Visual C++ 2013 finally added support for various C99 features in its C mode (including designated initializers, compound literals, and the _Bool type),[57] though it was still not complete.[58] 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.[59]

Most of the changes from the C11 revision of the standard are still not supported by Visual C++ 2017.[60] For example, generic selections via the _Generic keyword are not supported by the compiler and result in a syntax error.[61]

The preprocessor was overhauled in 2018, with C11 in sight:[62]

Full C11 conformance is on our roadmap, and updating the preprocessor is just the first step in that process. The C11 _Generic feature is not actually part of the preprocessor, so it has not yet been implemented. When implemented I expect the feature to work independently of if the traditional or updated preprocessor logic is used.

_Generic support has been committed to MSVC as of February 2020, not clear on when it will ship.[63]

In September 2020, Microsoft announced C11 and C17 standards support in MSVC.[64]

References[edit]

  1. ^ a b "Visual C++ adds Windows support". InfoWorld. February 22, 1993. p. 17.
  2. ^
  3. ^ "Do I need these Microsoft Visual C++ redistributables?". Ask Leo!. Retrieved 2012-11-18.
  4. ^ Leibson, Steve (1985-02-01). "Software Reviews: Expert team analyzes 21 C compilers". Computer Language. Retrieved 2020-06-05.
  5. ^ Ladd, Scott Robert (August 1, 1990). "Optimizing With Microsoft C 6.0".
  6. ^ Retrieved from http://support.microsoft.com/kb/196831.
  7. ^ a b "Visual C++ is a strong development tool". InfoWorld. June 21, 1993. p. 94.
  8. ^ "Rival DOS Extenders debut at show". InfoWorld. March 1, 1993. p. 18.
  9. ^ "Visual C++ 1.5 integrates OLE, ODBC". InfoWorld. November 8, 1993. p. 5.
  10. ^ "Microsoft set to prerelease 32-bit Visual C++". InfoWorld. July 19, 1993. p. 12.
  11. ^ "C++ IDEs evolve". InfoWorld. April 4, 1994. p. 79.
  12. ^ "Microsoft Visual C++ Strategy".
  13. ^ a b "Obsolete Products". Archived from the original on 2005-08-14.
  14. ^ Toth, Viktor (1996). "1". Visual C++ 4.0 unleashed. Indianapolis: SAMS Publishing. ISBN 9780672308741. Retrieved 26 July 2013.
  15. ^ "History of Visual Studio (Part 3)".
  16. ^ "Major Changes from Visual C++ 4.0 to 4.2". Archived from the original on 2010-02-28. Retrieved 2018-04-18.
  17. ^ "Major Changes from Visual C++ 4.2 to 5.0".
  18. ^ "Microsoft Visual C++ 5.0 Learning Edition". Archived from the original on April 27, 1999.
  19. ^ "Microsoft Visual C++ 5.0 Professional Edition". Archived from the original on April 27, 1999.
  20. ^ "Microsoft Visual C++ 5.0 Enterprise Edition". Archived from the original on April 17, 1999.
  21. ^ "Microsoft Visual C++ 5.0 RISC Edition". Archived from the original on April 29, 1999.
  22. ^ Shields, Nathan P. (June 8, 2018). "Criminal Complaint". United States Department of Justice. p. 128. This alone is not a dispositive link, as Visual C++ 6.0, released in 1998, still has proponents mostly because it does not require the installation of Microsoft’s .NET framework in order to run, as later versions of Visual C++ do.
  23. ^ "Major Changes from Visual C++ 5.0 to 6.0". Archived from the original on September 14, 2008.
  24. ^ This page stresses that Users must also be running Windows 98, Windows NT 4.0, or Windows 2000. Retrieved from http://msdn2.microsoft.com/en-us/vstudio/aa718349.aspx.
  25. ^ Douglas Boling :Programming Microsoft Windows CE .NET, Third Edition Microsoft Press; 3rd edition (June 25, 2003) Paperback: 1264 pages ISBN 978-0735618848 - Companion CD with Microsoft eMbedded Visual C++ 4.0 Service Pack 2 Archived 2013-02-11 at archive.today
  26. ^ How to: Modify WINVER and _WIN32_WINNT
  27. ^ Breaking Changes
  28. ^ Windows Platforms (CRT)
  29. ^ "Visual C++ 2008 Breaking Changes".
  30. ^ Visual C++ Team Blog. "IntelliSense, part 2: The Future". Retrieved March 12, 2008.
  31. ^ "Why IntelliSense is not supported for C++/CLI in Visual Studio 2010". Retrieved March 13, 2011.
  32. ^ Visual C++ Team Blog (27 May 2009). "Rebuilding Intellisense".
  33. ^ Visual C++ Team Blog. "Visual C++ Code Generation in Visual Studio 2010".
  34. ^ "C++0x Core Language Features In VC10: The Table".
  35. ^ "Stephan T. Lavavej: Everything you ever wanted to know about nullptr".
  36. ^ Microsoft Windows SDK Blog. "Released: Windows SDK for Windows 7 and .NET Framework 4".
  37. ^ FIX: Visual C++ compilers are removed when you upgrade Visual Studio 2010 Professional or Visual Studio 2010 Express to Visual Studio 2010 SP1 if Windows SDK v7.1 is installed
  38. ^ "What's New for Visual C++ in Visual Studio 2012". Microsoft Developer Network. Microsoft. Retrieved September 20, 2015.
  39. ^ "What's New for Visual C++ in Visual Studio 2013". Microsoft Developer Network. Miicrosoft. Retrieved September 20, 2015.
  40. ^ Eric Battalio (July 20, 2015). "Visual Studio 2015 RTM Now Available". Visual C++ Team Blog. Microsoft.
  41. ^ Stephan T. Lavavej (June 19, 2015). "C++11/14/17 Features In VS 2015 RTM". Visual C++ Team Blog. Microsoft.
  42. ^ Reviewing Microsoft's Automatic Insertion of Telemetry into C++ Binaries
  43. ^ "Visual Studio adding telemetry function calls to binary? • /r/cpp". reddit. 7 May 2016. Retrieved 2016-08-17.
  44. ^ Julia Liuson (March 7, 2017). "Announcing Visual Studio 2017 General Availability… and more". Visual Studio Team Blog. Microsoft.
  45. ^ Amanda Silver (February 14, 2019). "Join us April 2nd for the Launch of Visual Studio 2019!". Visual Studio Team Blog. Microsoft.
  46. ^ Amanda Silver (November 8, 2021). "Visual Studio 2022 now available". Visual Studio Team Blog. Microsoft.
  47. ^ "Pre-defined Compiler Macros / Wiki / Compilers". sourceforge.net. Retrieved 2016-02-11.
  48. ^ "Predefined macros". docs.microsoft.com. Retrieved 2021-12-06.
  49. ^ Microsoft MSDN: Breaking Changes in Visual C++
  50. ^ Microsoft MSDN: Containers (Modern C++)
  51. ^ Microsoft MSDN: Portability At ABI Boundaries (Modern C++)
  52. ^ Microsoft forum: Binary compatibility across Visual C++ versions Archived 2013-02-16 at archive.today
  53. ^ docs.microsoft.com: C++ binary compatibility between Visual Studio 2015, 2017, and 2019
  54. ^ a b C Run-Time Libraries
  55. ^ "Compatibility". Microsoft: CRT library features.
  56. ^ "C99 support". Microsoft Connect. Archived from the original on 2016-03-04. Retrieved 2015-09-21.
  57. ^ "What's New for Visual C++ in Visual Studio 2013". Microsoft Developer Network. Microsoft.
  58. ^ Pat Brenner (July 19, 2013). "C99 library support in Visual Studio 2013". Visual C++ Team Blog. Microsoft.
  59. ^ "What's New for Visual C++ in Visual Studio 2015". Microsoft Developer Network. Microsoft.
  60. ^ "Walkthrough: Compile a C program on the command line". Visual C++ Documentation. Microsoft.
  61. ^ "MSVC 2017 does not support _Generic (type generic macros) in C".
  62. ^ Luvsanbat, Bat-Ulzii (July 6, 2018). "MSVC Preprocessor Progress towards Conformance". Microsoft Developer Network. Archived from the original on 8 Jan 2019.
  63. ^ {{cite web|url=https://www.reddit.com/r/cpp/comments/hjn4uv/c20_features_and_fixes_in_vs_2019_161_through_166/fwsil0q/?context=3 |title=C++20 Features and Fixes |date=July 3, 2020 website=reddit
  64. ^ "C11 and C17 Standard Support Arriving in MSVC". September 14, 2020.

Further reading[edit]

External links[edit]