惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
D
DataBreaches.Net
U
Unit 42
P
Proofpoint News Feed
I
InfoQ
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
博客园 - Franky
博客园_首页
IT之家
IT之家
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志

博客园 - 赵青青

AI模型Claude的Haiku、Sonnet、Opus 怎么选? obsidian(md笔记管理)使用实践 python中可变参数与装饰器的例子 C++ lambda 表达式 3ds max的obj文件格式说明 CPython调试和性能分析 Python3类型安全type hint Python3虚拟机和对象 与ChatGPT的对话在windows上获取mac地址 Python311新特性-特化指令specializing adaptive interpreter-typing-asyncio 最小体积拉取git仓库并保持可更新 unity .net8 suppot comming pycharm一些减少代码warning的拼写检查设置 JavaScript速查表 Python cheatsheet 速查表 DirectX9(D3D9)游戏开发:高光时刻录制和共享纹理的踩坑 FFmpeg在游戏视频录制中的应用:画质与文件大小的综合比较 c++中字符串之string和char IMGUI快速入门
vs编译cpp时设置排除项
赵青青 · 2024-12-15 · via 博客园 - 赵青青

cpp编译排除

一个c++文件不需要被编译但还保留在工程中(阅读),可使用ExcludedFromBuild,有两种方法实现:

  1. 图形化操作
  2. 改vs的项目配置文件

图形化操作

在vs的资源管理器选中文件 - 右键 - 属性 - 切到当前的编译配置项(debug/release),有个选项【从生成中排除】,选择为是

image-20241119100056626

vcxproj文件

手动编辑,增加以下内容,注意路径

<ClCompile Include="..\..\..\src\tools\SFile.cpp">
  <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Published|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\src\tools\ffmpeg.cpp" />