从 C++/CLI 旧语法转换:如何以及可以实现自动化吗?
在从 Visual Studio 2005 过渡到 Visual Studio 2008 的过程中,我的(托管)c++ 项目开始出现此错误:
warning D9035 : option 'clr:oldsyntax' has been deprecated and will be removed in a future release.
如何从旧语法转换为新语法?
有人知道旧语法什么时候实际上已经过时并且不能再使用了吗?
编辑:(补充问题)
是否有任何工具可以自动执行此转换?
In the transition from Visual Studio 2005 to Visual Studio 2008 I started getting this error for my (managed) c++ projects:
warning D9035 : option 'clr:oldsyntax' has been deprecated and will be removed in a future release.
How to I convert from the old syntax to the new one?
Does anybody know when the old syntax actually becomes obsolete and cannot be used anymore?
EDIT: (supplementary question)
Are there by any chance any tools for doing this conversion automatically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要更改公共语言运行时支持,请打开 C++ 项目的属性对话框,然后选择节点配置属性 -> 一般。您可以在这里进行更改:
对于如何升级语法,我可以推荐这两篇优秀的 MSDN 文章:
向您展示一些示例
托管语言的变化
C++ 到 Visual C++ 2008 的扩展
升级清单:本主题列出
之间的句法差异
C++ 的托管扩展和
新的 Visual C++ 语法
To change the Common Language Runtime support you open the properties dialog for your c++ project and select the node Configuration Properties -> General. Here you can make the change:
For how to upgrade the syntax I can recommend these two excellent MSDN articles:
shows you examples of some of the
changes in the language from Managed
Extensions for C++ to Visual C++ 2008
Upgrade Checklist: This topic lists
the syntactic differences between
Managed Extensions for C++ and the
new Visual C++ syntax