Skip to content

Commit f58e834

Browse files
authored
Merge pull request #359 from MicrosoftDocs/mb-binary-compat
New topic for binary compatibility between VS2015 and VS2017
2 parents 9487138 + bdfdbe3 commit f58e834

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

docs/porting/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# [Visual C++ Porting and Upgrading Guide](visual-cpp-porting-and-upgrading-guide.md)
22
## [Visual C++ change history 2003 - 2015](visual-cpp-change-history-2003-2015.md)
33
## [Visual C++ What's New 2003 through 2015](visual-cpp-what-s-new-2003-through-2015.md)
4+
## [C++ Binary Compatibility between 2015 and 2017](binary-compat-2015-2017.md)
45
## [Overview of potential upgrade issues (Visual C++)](overview-of-potential-upgrade-issues-visual-cpp.md)
56
## [Porting 3rd-party libraries](porting-third-party-libraries.md)
67
## [Porting data applications](porting-data-applications.md)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "C++ Binary Compatibility between Visual Studio 2015 and Visual Studio 2017 | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "09/21/2017"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "cpp-language"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "article"
11+
dev_langs:
12+
- "C++"
13+
helpviewer_keywords:
14+
- "binary compatibility, Visual C++"
15+
ms.assetid: 591580f6-3181-4bbe-8ac3-f4fbaca949e6
16+
caps.latest.revision: 17
17+
author: "mikeblome"
18+
ms.author: "mblome"
19+
manager: "ghogen"
20+
---
21+
# C++ Binary Compatibility between Visual Studio 2015 and Visual Studio 2017
22+
23+
24+
In previous versions of Visual Studio, binary compatibility between object files (OBJs), static libraries (LIBs), dynamic libraries (DLLs), and executables (EXEs) built by using different versions of the compiler toolset and runtime libraries was not guaranteed. This has changed in Visual Studio 2017. In Visual Studio 2015 and Visual Studio 2017, the C++ toolset major number is 14 (v140 for Visual Studio 2015 and v141 for Visual Studio 2017). This reflects the fact that both the runtime libraries and the applications compiled with either version of the compiler are--for the most part--binary compatible. This means, for example, that you can create a DLL in Visual Studio 2017, and consume it from an application compiled with Visual Studio 2015, or use the Visual Studio 2017 redistributable libraries with your application built by using the 2015 toolset.
25+
26+
There are two exceptions to this rule. Binary compatibility is not guaranteed in these cases:
27+
28+
1) When static libraries or object files are compiled with the /GL compiler switch.
29+
30+
2) When the application consumes redistributable
31+
libraries whose version number is less than the toolset that is used to compile the application. In other words, if you compile a program with platform toolset v141, any redistributable libraries that the application consumes must be compiled with v141 or greater.
32+
33+
## See Also
34+
35+
[Visual C++ change history](..\porting\visual-cpp-change-history-2003-2015.md)
36+
37+

0 commit comments

Comments
 (0)