CS_EE
CS_EE

Reputation: 449

Visual Studio 2015 vs 2012

Upvotes: 0

Views: 1062

Answers (1)

MuertoExcobito
MuertoExcobito

Reputation: 10049

In general, static libraries are not compatible between different versions of Visual Studio.

https://en.wikipedia.org/wiki/Visual_C%2B%2B#Compatibility

The Visual C++ compiler ABI have 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.

I have not specifically tried doing VS2015 -> VS2012, but going the other way definitely has some issues (VS2012/VS2013 -> VS2015). However, in VS2015, there are undocumented libraries (legacy_stdio_definitions.lib and legacy_stdio_wide_specifiers.lib) which attempt to mitigate some specific problems, but they aren't a catch-all for compatibility.

The best solution is to compile the static library with the version of Visual Studio you intend to consume it in.

Upvotes: 1

Related Questions