简体   繁体   English

将自定义构建步骤的输出添加到项目

[英]add output of custom build step to project

How do I add the output of a custom build step in visual studio to the c++ project itself?如何将 Visual Studio 中自定义构建步骤的输出添加到 C++ 项目本身?

For example, I have a parser that, as part of the build process, reads in some files, creates .hpp and .cpp in the custom build steps.例如,我有一个解析器,作为构建过程的一部分,它读入一些文件,在自定义构建步骤中创建 .hpp 和 .cpp。 These output .hpp and .cpp files then need to be added to the project and be built during the same build process.然后需要将这些输出 .hpp 和 .cpp 文件添加到项目中,并在同一构建过程中构建。

Is there a way to do all these in a single build in Visual Studio?有没有办法在 Visual Studio 的单个构建中完成所有这些?

You can use build events to specify commands that run before the build starts, before the link process, or after the build finishes.您可以使用构建事件来指定在构建开始之前、链接过程之前或构建完成之后运行的命令。

Specifying Build Events at Microsoft Docs在 Microsoft Docs 中指定生成事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM