Skip to content

Commit 1596189

Browse files
authored
Merge pull request MicrosoftDocs#2484 from corob-msft/cr-bin-compat-acro
Update bin compat with Acrolinx changes
2 parents 21992ab + d954665 commit 1596189

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
2-
title: "C++ binary compatibility between Visual Studio 2015 and Visual Studio 2019"
2+
title: "C++ binary compatibility between Visual Studio 2015, 2017, and 2019"
33
description: "Describes how binary compatibility works between compiled C++ files in Visual Studio 2015, 2017, and 2019. One Microsoft Visual C++ Redistributable package works for all three versions."
4-
ms.date: "11/07/2019"
4+
ms.date: "11/11/2019"
55
helpviewer_keywords: ["binary compatibility, Visual C++"]
66
ms.assetid: 591580f6-3181-4bbe-8ac3-f4fbaca949e6
77
---
8-
# C++ binary compatibility between Visual Studio 2015 and Visual Studio 2019
8+
# C++ binary compatibility between Visual Studio 2015, 2017, and 2019
99

10-
In Microsoft Visual Studio 2013 and earlier, binary compatibility isn't guaranteed between object files (OBJs), static libraries (LIBs), dynamic-link libraries (DLLs), and executables (EXEs) that were built by using different versions of the compiler toolset and runtime libraries.
10+
The Microsoft C++ (MSVC) compiler toolsets in Visual Studio 2013 and earlier don't guarantee binary compatibility across versions. You can't link object files, static libraries, dynamic libraries, and executables built by different versions. The ABIs, object formats, and runtime libraries are incompatible.
1111

12-
In Visual Studio 2015 and later, the C++ toolset major number is 14 (v140 for Visual Studio 2015, v141 for Visual Studio 2017, and v142 for Visual Studio 2019). This numbering reflects the fact that both the runtime libraries and the applications compiled with any of these versions of the compiler are binary-compatible. Therefore, if you have a third-party library that was built with Visual Studio 2015, you don't have to recompile it in order to consume it from an application that was built with Visual Studio 2017 or Visual Studio 2019.
12+
We've changed this behavior in Visual Studio 2015, 2017, and 2019. The runtime libraries and apps compiled by any of these versions of the compiler are binary-compatible. It's reflected in the C++ toolset major number, which is 14 for all three versions. (The toolset version is v140 for Visual Studio 2015, v141 for 2017, and v142 for 2019). Say you have third-party libraries built by Visual Studio 2015. You can still use them in an application built by Visual Studio 2017 or 2019. There's no need to recompile with a matching toolset. The latest version of the Microsoft Visual C++ Redistributable package (the Redistributable) works for all of them.
1313

14-
The only exception to this rule is that static libraries or object files that are compiled with the `/GL` compiler switch are *not* binary-compatible.
14+
There's an exception to this rule: static libraries or object files compiled using the `/GL` compiler switch *aren't* binary-compatible across versions.
1515

16-
When you mix binaries built with different supported versions of the Microsoft C++ (MSVC) toolset, the Visual C++ redistributable package that your application runs on can't be older than any of the toolset versions used to build your app or any libraries it consumes.
16+
The Redistributable your app uses has an important binary-compatibility restriction. It applies when you mix binaries built with different supported versions of the toolset. The Redistributable version must be at least as new as the latest toolset used by any app component.
1717

1818
## Upgrade the Microsoft Visual C++ Redistributable from Visual Studio 2015 or 2017 to Visual Studio 2019
1919

20-
Because we have preserved binary compatibility and kept the major version (14) the same across the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019, only one version of the Visual C++ Redistributable can be installed from those at any one time. A newer version overwrites an older version that's already installed. If you have the Visual C++ Redistributable from Visual Studio 2015 or 2017 and then later install Visual Studio 2019, the 2019 version overwrites the older version. Because we make sure that the latest version has all the newest features and bug fixes (including security fixes), we always recommend that you upgrade to the latest available version.
20+
We've kept the Microsoft Visual C++ Redistributable major version number the same for Visual Studio 2015, 2017, and 2019. That means only one instance of the Redistributable can be installed at a time. A newer version overwrites any older version that's already installed. For example, one app may install the Redistributable from Visual Studio 2015. Then, another app installs the Redistributable from Visual Studio 2019. The 2019 version overwrites the older version, but because they're binary-compatible, the earlier app still works fine. We make sure the latest version of the Redistributable has all the newest features, security updates, and bug fixes. That's why we always recommend you upgrade to the latest available version.
2121

22-
Similarly, we don't let you install an older version of the Visual C++ Redistributable on a machine where a newer version is already installed. Installing the Visual C++ Redistributable from Visual Studio 2015 or 2017 on a machine that already has the 2019 version triggers an installation failure. The error resembles the following:
22+
Similarly, you can't install an older Redistributable when a newer version is already installed. The installer reports an error if you try. You'll see an error like this if you install the 2015 or 2017 Redistributable on a machine that already has the 2019 version:
2323

2424
```Output
2525
0x80070666 - Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
2626
```
2727

28-
This error is by design. We recommend keeping the newest version installed.
28+
This error is by design. We recommend you keep the newest version installed. Make sure your installer can recover from this error silently.
2929

3030
## See also
3131

32-
* [Visual C++ change history](../porting/visual-cpp-change-history-2003-2015.md)
33-
* [The latest supported Visual C++ Redistributable downloads](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
32+
[Visual C++ change history](../porting/visual-cpp-change-history-2003-2015.md)\
33+
[The latest supported Visual C++ Redistributable downloads](https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads)

0 commit comments

Comments
 (0)