Eclipse CDT 中的构建后步骤
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2317113/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Post-build step in Eclipse CDT
提问by Alex F
Eclipse SDK 3.5.1, CDT. I have the following workspace tree:
Eclipse SDK 3.5.1,CDT。我有以下工作区树:
Bin (just directory) --Debug --Release Client (project) --Debug --Release
In the Client project, Debug configuration, I fill Post-Build step:
在 Client 项目,Debug 配置中,我填写 Post-Build 步骤:
cp Debug/Client ../Bin/Debug/
I want to copy output executable to Bin/Debug directory. Building the project, I have this error message: make[1]:[post-bulld] Error 1 (ignored) line 0
我想将输出可执行文件复制到 Bin/Debug 目录。构建项目,我有这个错误信息:make[1]:[post-bulld] Error 1 (ignored) line 0
What is wrong? Also, can I use some variables, like Workspace directory, current configuration etc. in Post-Build step? Where can I find these variables and how to use them? Thank you.
怎么了?另外,我可以在 Post-Build 步骤中使用一些变量,比如工作区目录、当前配置等吗?我在哪里可以找到这些变量以及如何使用它们?谢谢你。
回答by Alex F
Found solution: current directory is Debug, and not project directory, the command should be:
找到解决方案:当前目录是Debug,而不是项目目录,命令应该是:
cp Client ../../Bin/Debug/