-1

We have a different teams with different versions of VS2015 installed. Some have 2015 SP2 installed, other VS2015 SP3 installed.

I'm wondering if the C++ runtime provided by these service packs are compatable. I.e.:

  • Can I run a VS2015 SP3 C++ executable with VS2015 SP2 dlls (passing C++ objects)?
  • And vice-versa: Can I run a VS2015 SP2 C++ executable with VS2015 SP3 dlls (passing C++ objects)?

I was unable to find any information about compatibility...

Serge Weinstock
  • 1,235
  • 3
  • 12
  • 20
  • Why would you assume *in*compatibility? A service pack offers fixes, it's not a major version upgrade. Have you encountered any problems? – Panagiotis Kanavos Feb 07 '17 at 10:50
  • BTW your application will probably end up running with the latest version anyway once Windows Update updates the runtime – Panagiotis Kanavos Feb 07 '17 at 10:50
  • @PanagiotisKanavos: "Why would you assume *in*compatibility?" - Long years of bitter experience perhaps? It's surprisingly easy to introduce such incompatability by accident. – Martin Bonner supports Monica Feb 07 '17 at 10:54
  • @MartinBonner not really - such things (accidental breaking changes in core components) are so rare that they make the news, get pulled and fixed within days. Breaking changes are always mentioned in the release notes. The C++ runtime libraries *are* a core component for all C++ applications – Panagiotis Kanavos Feb 07 '17 at 12:10
  • 1
    "Yes" is a very boring answer and never posted. So you are only ever going to hear from somebody that has a "no" answer. That you can't find anything about compatibility issues implies the most accurate answer. If it turned out to be "no" anyway then you can always click the Ask Question button. – Hans Passant Feb 07 '17 at 15:03
  • Unless I'm missing something, VS2015 is an IDE and not really the .NET container which is what needs to be the compatible bit. – apokryfos Feb 07 '17 at 17:50

1 Answers1

0

There is no Visual Studio 2015 Service Pack 2 or 3. You're probably talking about: Visual Studio 2015 Update 2 and Visual Studio 2015 Update 3.

So I believe your question should be translated:

Were there any changes made to the C++ standard objects by Visual Studio 2015 Update 3?

You can find a list of the changes made to the C++ compiler here: https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs#visualcpp

Your question specifically focuses on changes to the standard libraries, which are listed here:

  • We've restored debug mode performance when destroying ranges of trivial objects that regressed in Update 2, like in vector.
  • We've implemented the swappable traits from the C++17 working paper, from the proposal P0185 Adding [nothrow-]swappable traits. As a speculative C++17 feature, the traits (is_swappable, is_swappable_with, is_nothrow_swappable, and is_nothrow_swappable_with) are only visible, and the constraints on std::swap are only active, when compiling with /std:c++latest.
  • We've removed ETW eventing calls from vcruntime140.dll and static libraries that previously fired during process startup and dllmain.
  • New We've removed symbol name length in common machinery used by STL containers, such as std::vector, reducing likelihood of C4503 warnings. For example, the following type no longer generates a warning: concurrency::concurrent_unordered_map<>>>>.

The last bullet indicates the symbol naming, internal to C++ objects has changed. Meaning that in an object created by one Update, the symbol names will not necessarily be consistent with the symbol names expected by the other update. So the answer to your question is: No, the objects symbol naming changed between versions. They are no longer guaranteed to be compatible.


Furthermore, I've definitely wasted a tremendous amount of time trying to figure out why something that worked in one section of code didn't in another, for me it was just do to a minor update. By my experience I'd implore you: Keep your entire team on the exact same Visual C++ version. If you don't 1 of 2 things will happen:

  1. You'll have team members that are always suspicious of version differences. If something they expected to work doesn't they'll feel the need to try it on the other version of Visual C++. Even worse they may feel the need to ensure that their code is supported if used in the other version of Visual C++. You will experience a slow and steady time drip here.
  2. You'll have team members who use functionality that did change between versions. But they don't recognize the version change as the culprit. This problem will cost an exorbitant time volume as identifying the bug will be very difficult.

To summarize the correct answer is to: Get your entire team on a fixed version of Visual Studio, and you won't have that nagging worry in your head or their heads all the time.

Community
  • 1
  • 1
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
  • 1
    I'm not sure I follow your logic. MS has renamed actual STL types, and you expect it to just work? If part of the code expects the runtime to provide AAA, and the new runtime has renamed that to just AA, then things break. – MSalters Feb 07 '17 at 13:07
  • @MSalters I misunderstood that last bullet point. It makes sense now in light of your comment. I've edited accordingly. – Jonathan Mee Feb 07 '17 at 13:41
  • Thanks, I'm working in a big organisation, and our choice has been set to SP2 (sorry update 2 ;-) ). We have a big issue: VS studio installer. There is no easy way to revert back to SP2. Full un-installation very often doesn't work correctly. And the biggest issue: even when installing VS2015 Update2, the installer does seem to check on the net and find a newer update and install Update 3!!!!!! – Serge Weinstock Feb 07 '17 at 15:46
  • @SergeWeinstock I believe my answer has addressed the original question. You seem to be asking the follow up question: "How can I install Visual Studio 2015 Update 2 and prevent it from installing update 3?" That might could be addressed as a http://www.stackoverflow.com question, but I'd encourage you to accept this answer, then open that question on: http://superuser.com/ – Jonathan Mee Feb 07 '17 at 16:22