致命错误C1189:#error:MFC WinForms支持需要/ clr(不支持oldSyntax) [英] fatal error C1189: #error : MFC WinForms support requires /clr (doesn't support oldSyntax)

查看:243
本文介绍了致命错误C1189:#error:MFC WinForms支持需要/ clr(不支持oldSyntax)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在MFC上托管C#表单 在visual studio 2013上,如https://msdn.microsoft.com/en-us/library/b1kyh79x.aspx所述


它适用于小型应用程序,现在我必须做与现有MFC应用程序相同。我得到了这个编译错误:


致命错误C1189:#error:MFC WinForms支持需要/ clr(不支持oldSyntax)。



我对MFC和C#表格之间的互操作知之甚少


任何有关如何解决此问题的指南都将不胜感激。


解决方案





致命错误C1189:#error:MFC WinForms支持需要/ clr(不支持oldSyntax)。








检查你有什么设置在项目属性中,在
下,
配置属性 - >一般:公共语言运行时支持



需要设置为:公共语言运行时支持(/ clr)



- Wayne


I am trying to host C# Form on MFC  on visual studio 2013 as described at https://msdn.microsoft.com/en-us/library/b1kyh79x.aspx

Its works on a small application , now I have to do the same thing to an existing MFC application. and I got this compilation error:

fatal error C1189: #error : MFC WinForms support requires /clr (doesn't support oldSyntax).

I have little knowledge about interoperation between MFC and C# FORMs

any guide to how to fix this issue will be appreciated.

解决方案


fatal error C1189: #error : MFC WinForms support requires /clr (doesn't support oldSyntax).


Check what setting you have in the Project Properties under

Configuration Properties->General: Common Language Runtime Support

It needs to be set to: Common Language Runtime Support (/clr)

- Wayne


这篇关于致命错误C1189:#error:MFC WinForms支持需要/ clr(不支持oldSyntax)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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