编译器警告C4945 [英] Compiler warning C4945
问题描述
我在一个解决方案中有3个项目.一个项目是C#程序集"Common".另一个是c#程序集"Forms".第三个是托管的C ++项目"Main".表格和主要参考书都通用.因此,我收到了数百次垃圾邮件的编译警告,每个受管理对象一次: 警告C4945:'CSlideBar':无法从'c:\ toolkit \ managed \ common \ bin \ debug \ toolkitdncsharp.dll'中导入符号:因为'ToolKit :: Controls :: CSlideBar'已从另一个程序集中导入'toolkitDNCsharp' I have 3 projects in one solution. One projects is a C# assembly, 'Common'. Another is a c# assembly, 'Forms'. And the third is a managed C++ project, 'Main'. Both Forms and Main reference Common. Because of this, I get the compile warning spammed hundreds of times, one per managed object: warning C4945: 'CSlideBar' : cannot import symbol from 'c:\toolkit\managed\common\bin\debug\toolkitdncsharp.dll': as 'ToolKit::Controls::CSlideBar' has already been imported from another assembly 'toolkitDNCsharp' 1> 'c:\ toolkit \ managed \ common \ bin \ debug \ toolkitdncsharp.dll':请参见"ToolKit :: Controls :: CSlideBar'的声明 1> 'c:\toolkit\managed\common\bin\debug\toolkitdncsharp.dll': see declaration of 'ToolKit::Controls::CSlideBar' 1>使用首次看到的类型;将导入的程序集重新排序以使用当前类型 1> first seen type is used; re-order imported assemblies to use the current type 当您说它似乎不可燃时,您是说您的应用程序无法编译,链接和运行吗? When you say it doesn't appear to be ignorable, do you mean your app doesn't compile, link and run correctly? #实用指示警告(禁用:4945) #pragma warning(disable: 4945) 这篇关于编译器警告C4945的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
推荐答案
还是您不喜欢它显示出来的事实?是否使用
Or do you just not like the fact that it shows up? Did using
有帮助吗?
help at all?