This SO post: Is Visual-C++-2017 binary compatible with VC++-2015? clearly says that VS 2017 is binary compatible with VS 2015. It even looks like the official position.
My question is, in the past, I distinctly remember running into linker errors (I do not recall the specific set of errors) every time I try to link in a static library that was compiled with a different version of MSVC into an EXE that is being built with a newer version of MSVC.
Yet, binary (in)compatibility sounds like something that will blow up in your face at runtime, not link time.
Can someone tell me if previous versions of MSVC did indeed producer linker errors on version mismatches? How was this accomplished?
EDIT
How does this affect static libraries built with WPO/LTCG turned on? I believe these produce intermediate object files (as opposed to COFF) and Microsoft did not guarantee the format of these intermediate files to remain stagnant across different versions of the compiler.
/FAILIFMISMATCH:_MSC_VER=1900
in the resulting .obj file. Now I built an EXE with VS 2017 and linked against this static lib. Everything built nicely. So either VS 2017 doesn't care if _MSC_VER=1900 or something else is going on. – Arnhem