Reputation: 18168
I am trying to builda c++ code which was developed VS 2010
I can compile it, but during link, I am getting this error:
Error 1 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in myfile.obj
I know that it is because they are build with different version of MSVC, but is there any way that I can configure MSVC to use libraries compiled with older version of MSVC?
Edit 1
At the end , I decided to install VS2012 express and compile code with it. It seems the Microsoft doesn't like you to port one project from one version of MSVC to another one easily.
Upvotes: 0
Views: 1467
Reputation: 13003
MSVC static libraries are binary incompatible between major versions (at least those which use Microsoft's STL implementation):
C++ Standard Library implementation intentionally breaks binary compatibility among versions of Visual Studio (2005, 2008, 2010, 2012). (source)
You can either:
Upvotes: 1
Reputation: 14510
You have three solutions to solve this problem :
In Project Properties, select General and then change the "Platform Toolset" setting to "Visual Studio 2010 (v100)."
Upvotes: 1