In my VS2012 I have 4 toolsets available: v90, v100, v110 and v110_xp. I did a simple test with two projects testlib (a static library) and testexe (console application). The interface was just one function with signature void test()
. The results:
- testlib(v90), testexe(anything other than v90) -> does not link
- testlib(v100), testexe(v110 or v110_xp) -> does link
However, it seemed somewhat weird to me that v100 and v110 would link so I tried to complicate the scenario a little bit. Now my method looks like this: std::map<std::string, std::string> test(const std::string& arg)
. As expected, the testlib(v100) and testexe(v110) do not link (mismatch detected for '_MSC_VER'
).
But still the testlib(v110) and testexe(v110_xp) do link and the resulting exe works on Windows XP. Is this just by chance or is this a supported scenario? If this is just by chance then an example code that is using only features available in v110_xp and breaks this compatibility would be welcome. I am wondering whether I should deploy two versions of my library to my clients or just the one compiled with v110 will do.