预构建事件语法 [英] Prebuild event syntax

查看:122
本文介绍了预构建事件语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要在构建项目之前运行.cmd文件.既然如此,该.cmd文件会生成一个标头文件,该文件是成功构建此项目所必需的.如何在prebuild事件中提供命令行语法?

谢谢.

Hi all,

I need to run .cmd file before the project is getting build.Since,that .cmd file generates one header file which is required for successful build of this project.How to give the command line syntax in prebuild event?

Thanks.

推荐答案

如果从命令行(?)进行构建,最明显的方法是同时运行命令文件和从新命令文件进行的构建,
If you build from the command line (?), the most obvious way is to run both your command file and your build from a new command file, the one after the other.


转到Build Events>生成事件前,然后输入所需的命令行.确保提供cmd文件的完整路径,如果路径包含空格,请将其括在引号中.您可以使用如下所示的dos管道:
Go to Build Events > Pre Build Events and enter the command line you want. Be sure to give the full path of the cmd file, and enclose it in quotes if the path has spaces. You can use dos piping like this:
c:\project\mycmd.cmd > new.h

有些宏可能会有用.单击宏"按钮以查看列表.

There are some macros that might be useful. Click on the Macros button to see list.


这篇关于预构建事件语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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