这个 MSVC 符号是什么意思?

发布于 2025-01-08 14:39:52 字数 104 浏览 1 评论 0原文

我注意到项目源文件上的这个小标志,但不知道它意味着什么。

在此处输入图像描述

I noticed this little sign on a project source file and didn't know what it meant.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听风念你 2025-01-15 14:39:52

这意味着该文件已被配置为在项目中被忽略(不编译)。

该特定选项在“常规”属性中称为“从构建中排除”。

It means the file has been configured to be ignored (not compiled) in the project.

The specific option is called 'Exclude From Build' in the General property.

坠似风落 2025-01-15 14:39:52

除了 Steve 的回答之外,我还要补充一点:

  • 您的项目/解决方案可能有多种配置(调试/发布、Win32/x64 以及其他自定义配置,如“HighPerformance”、“ForMobile”、“ManagedDLL”),并且您可能喜欢 <强>不编译一组源文件。为此,您可以将它们放入“排除”中。
  • 要排除,只需选择源文件(.CPP、.C),打开它的属性页,然后将“从构建中排除”设置为“是”。要使其成为构建过程的一部分(即让它编译),请将此属性设置为否。
  • 头文件不需要放入排除项中,因为它们不会被编译器编译,这只是供程序员查看。仅当某些源文件包含标头时才会编译标头。

In addition to Steve's answer, I would add:

  • Your project/solution may have multilple configurations (Debug/Release, Win32/x64, and other custom configurations like "HighPerformance", "ForMobile", "ManagedDLL"), and you may like not to have set of source files get compiled. For, this you may put them into "Excludes".
  • To put into exclusion, just select the source file (.CPP, .C), open property page for it, and set "Excluded from Build" to Yes. To make it part of build process (i.e. let it compile), set this property to No.
  • Header Files need not to be put into exclusions, as they wont be compiled by compiler, it is just for programmer's view. Headers are only compiled when some source file do include them.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文