迁移到VS 2012后链接错误 [英] Link Errors after migrating to VS 2012

查看:261
本文介绍了迁移到VS 2012后链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含VC ++项目(MFC应用程序和静态库)和C#项目(类库)的解决方案。 VC ++项目是启用clr的项目,所有这些项目的.Net框架都设置为3.5。解决方案是在VS 2008上。现在我已将
解决方案升级到VS 2012.升级后,所有VC ++项目都针对.Net 4.0框架,所有c#项目都针对.Net 3.5框架。我可以在升级后编译并运行应用程序。 

I have a solution which has VC++ projects(MFC apps and static Libraries) and C# projects(class libraries). VC++ projects are clr enabled projects and .Net framework for all these projects are set to 3.5. The solution was on VS 2008. Now I have upgraded the solution to VS 2012. After upgrade, all VC++ projects are targeted to .Net 4.0 framework and all c# projects are targeted to .Net 3.5 framework. I am able to compile and run the app after upgrade. 

但是我想将所有项目的目标框架设置为4.5。对于C#项目,我通过VS 2012 IDE更改了.Net框架,对于VC ++项目,我手动修改了.vcxproj文件,并将目标框架更改为4.5。更改
.net框架后,我看到如此多的链接错误,如:

But I want to set the target framework for all the projects to 4.5. For C# projects I changed the .Net framework through VS 2012 IDE and for VC++ projects I modified the .vcxproj files manually and i changed the target framework to 4.5. After changing the .net framework i see so many link errors like:

test.lib(test.obj):错误LNK2022:元数据操作失败(80131195):自定义属性不一致:(0x0c000604)。

test.lib(test.obj):错误LNK2022:元数据操作失败(80131195):自定义属性不一致:(0x0c0007a8)。

test.lib(test.obj):错误LNK2022:元数据操作失败(80131195):自定义属性不一致:(0x0c0007ab)。
$
链接:错误LNK2034:元数据与COFF符号不一致table:symbol'?? B?$ CSimpleStringT @ _W $ 00 @ ATL @@ $$ FQBEPB_WXZ'(060002B3)与test.lib(test.obj)中的(0A000270)元数据不一致

链接:错误LNK2034:与COFF符号表不一致的元数据:符号'?? 0?$ CStringT @ _WV?$ StrTraitMFC_DLL @ _WV?$ ChTraitsCRT @ _W @ ATL @@@@@ ATL @@ $$ FQAE @ XZ'(0600028A) test.lib(test.obj)中与(0A000273)不一致的元数据

链接:错误LNK2034:元数据与CO不一致FF符号表:符号'?? 0?$ CStringT @ _WV?$ StrTraitMFC_DLL @ _WV?$ ChTraitsCRT @ _W @ ATL @@@@@ ATL @@ $$ FQAE @ ABV01 @@ Z'(060002AF)与元数据不一致(0A000274)在test.lib(test.obj)中

test.lib(test.obj) : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000604).
test.lib(test.obj) : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c0007a8).
test.lib(test.obj) : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c0007ab).
LINK : error LNK2034: metadata inconsistent with COFF symbol table: symbol '??B?$CSimpleStringT@_W$00@ATL@@$$FQBEPB_WXZ' (060002B3) has inconsistent metadata with (0A000270) in test.lib(test.obj)
LINK : error LNK2034: metadata inconsistent with COFF symbol table: symbol '??0?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@$$FQAE@XZ' (0600028A) has inconsistent metadata with (0A000273) in test.lib(test.obj)
LINK : error LNK2034: metadata inconsistent with COFF symbol table: symbol '??0?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@$$FQAE@ABV01@@Z' (060002AF) has inconsistent metadata with (0A000274) in test.lib(test.obj)

对这些错误有什么看法?如何解决这些错误?请帮助我...

Any idea about these errors? How to resolve these errors? Please help me ...

谢谢

推荐答案

嗨Labhshty,

Hi Labhshty,

欢迎来到这里。

您能否发送电子邮件至Microsoft dot com的netfx45compat,并提供以下信息?

Could you email us at netfx45compat at Microsoft dot com with following information?


  • 重现问题
  • 操作系统

祝你有愉快的一天。

谢谢


这篇关于迁移到VS 2012后链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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