迁移到VS 2012后链接错误

编程入门 行业动态 更新时间:2024-10-21 03:52:46
本文介绍了迁移到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。更改 框架后,我看到如此多的链接错误,如:

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 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后链接错误

本文发布于:2023-11-15 23:37:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1598978.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   链接

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!