VC2008,如何在C ++ / CLI项目中关闭单个文件的CLR标志 [英] VC2008, how to turn CLR flag off for individual files in C++/CLI project

查看:209
本文介绍了VC2008,如何在C ++ / CLI项目中关闭单个文件的CLR标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此帖表示可以关闭个别.cpp文件的CLR标志。

This post says that it is possible to turn off the CLR flag for an individual .cpp file.

从帖子:
您可以单独在每个.cpp文件中设置/ CLR打开或关闭。打开它
整个项目,。如你所做的,然后关闭文件
只包含本机(非托管)代码。当您打开VC ++ procject
属性对话框时,您仍然可以单击
解决方案资源管理器中的文件/项目来更改您正在处理的范围。点击
非托管的.cpp文件,仅为该文件设置选项。

From the post: You can set /CLR on or off in each .cpp file individually. Turn it on for the whole project,. as you have done, then turn it off for the files containing only native (unmanaged) code. When you have the VC++ procject properties dialog open, you can still click on files/projects in the solution explorer to change the scope that you're working on. Click on the unmanaged .cpp file to set options for just that file.

这是真的吗?我不知道如何通过属性页面为我的C + + / CLI项目。

Is this true? I can't figure out how to do it through the property pages for my C++/CLI project. How would I accomplish this?

推荐答案

只需右键单击解决方案资源管理器中的文件,然后点击属性。该选项是编译公共语言运行时支持,在C / C ++ - >常规。

Just right click on a file in Solution Explorer and hit Properties. The option is "Compile with Common Language Runtime Support", under C/C++ -> General.

这篇关于VC2008,如何在C ++ / CLI项目中关闭单个文件的CLR标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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