错误LNK2038:检测到“_MSC_VER”的不匹配:值“1600”与CppFile1.obj中的值'1700'不匹配 [英] error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj

查看:703
本文介绍了错误LNK2038:检测到“_MSC_VER”的不匹配:值“1600”与CppFile1.obj中的值'1700'不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的项目从Vs2010转换到VS2012.But iam得到一个_MSC_VER链接器错误在某些项目。经过长时间的冲浪通过谷歌我发现,问题是由于链接一个库在VS2010到VS2012.How我发现哪个projectis导致错误。
这里iam引用错误

I was converting my projects from Vs2010 to VS2012.But iam getting an _MSC_VER linker error in certain projects.After a long surfing through google i found out that the issue is due to linking of a librarycreated in VS2010 to Vs2012.How can i find out that which projectis causing the error. Here iam quoting the error

Error   6   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj      D:\ProjectLocation\Projectname1.lib(CppFile2.obj) Projectname2
Error   15  error LNK2001: unresolved external symbol "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" (?_Facet_Register@facet@locale@std@@CAXPAV123@@Z)  D:\ProjectLocation\Projectname1.lib(CppFile3.obj)   Projectname2
Error   13  error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile4.obj)   Projectname2
Error   12  error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile5.obj)   Projectname2
Error   10  error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile6.obj)   Projectname2
Error   11  error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile7.obj)   Projectname2
Error   9   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile8.obj)   Projectname2
Error   4   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj       D:\ProjectLocation\Projectname1.lib(CppFile9.obj)    Projectname2
Error   14  error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile10.obj)  Projectname2
Error   7   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile11.obj)  Projectname2
Error   8   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile12.obj)  Projectname2
Error   5   error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in CppFile1.obj    D:\ProjectLocation\Projectname1.lib(CppFile13.obj)  Projectname2


推荐答案

您正在尝试链接由不同版本的编译器编译的对象。这在VS的现代版本不支持,至少不是如果你使用C ++标准库。不同版本的标准库是二进制不兼容的,因此您需要使用相同的版本编译链接器的所有输入。确保重新编译所有要链接的对象。

You are trying to link objects compiled by different versions of the compiler. That's not supported in modern versions of VS, at least not if you are using the C++ standard library. Different versions of the standard library are binary incompatible and so you need all the inputs to the linker to be compiled with the same version. Make sure you re-compile all the objects that are to be linked.

编译器错误命名所涉及的对象,所以信息的问题已经有你正在寻找的答案。具体来说,你链接的静态库似乎需要重新编译。

The compiler error names the objects involved so the information the the question already has the answer you are looking for. Specifically it seems that the static library that you are linking needs to be re-compiled.

这篇关于错误LNK2038:检测到“_MSC_VER”的不匹配:值“1600”与CppFile1.obj中的值'1700'不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆