如何在 PostBuild 事件上并行执行程序?
我设法在项目选项中使用以下指令构建/运行项目时将编译器设置为执行另一个程序:
call program.exe param1 param2
问题是编译器执行“program.exe”并等待它终止,然后运行项目可执行文件。
我要问的是:如何设置编译器并行运行两个可执行文件,而不等待 PostBuild 事件中的一个终止?
提前致谢
I managed to set the compiler to execute another program when the project is built/ran with the following directive in project options:
call program.exe param1 param2
The problem is that the compiler executes "program.exe" and waits for it to terminate and THEN the project executable is ran.
What I ask: How to set the compiler to run both executables in parallel without waiting for the one in PostBuild event to terminate?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道 IDE 如何设法等待“start”启动的进程终止,但在您自己的程序启动器中最简单地调用“CreateProcess”似乎可以。
编译某物。喜欢;
然后在 PostBuild 上输入:
I'd have no clue how the IDE manages to wait for the termination of processes initiated by "start", but calling "CreateProcess" at its simplest in your own program starter seems to serve.
Compile sth. like;
and then on PostBuild put:
使用启动program.exe,而不是调用program.exe
Instead of call program.exe, use start program.exe
创建一个bat文件。按照 Alan 的建议,在其中添加一些带启动的命令:
然后调用此 bat 文件。
Create a bat file. Put there few commands with start, as Alan suggested:
Then call this bat file.