C++ 为 MinGW 配置 Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12627481/
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
Configuring Eclipse for MinGW
提问by bogus
I am using Eclipse Juno with MinGW (latest version) on my Win7-Laptop. My example code is successfully built within the IDE, but I can neither run nor debug it!
我在我的 Win7 笔记本电脑上使用 Eclipse Juno 和 MinGW(最新版本)。我的示例代码在 IDE 中成功构建,但我既无法运行也无法调试它!
When I choose Run as=>Local C/C++-Application, I get
当我选择 Run as=>Local C/C++-Application 时,我得到
Launch failed. Binary not found.
启动失败。未找到二进制文件。
However, there IS an exe-file as a result of the build process!
但是,由于构建过程,存在一个 exe 文件!
When I call cmd.exe, navigate to the source directory and call this built exe (a.out.exe), it works without problems!
当我调用 cmd.exe 时,导航到源目录并调用这个构建的 exe (a.out.exe),它可以正常工作!
I guess this is due to wrong/missing configuration of eclipse, but I couldn't find useful info on that so far. This threadmentions environment variables. I added MinGW and Msys to my PATH variable (that's why I can compile) but I can't run my software in eclipse!
我想这是由于 eclipse 的错误/缺少配置,但到目前为止我找不到有用的信息。 该线程提到了环境变量。我将 MinGW 和 Msys 添加到我的 PATH 变量中(这就是我可以编译的原因)但我无法在 Eclipse 中运行我的软件!
So, what can be done to enable debugging?
那么,可以做些什么来启用调试?
回答by moskito-x
I have made a little tutorial.
how to set all for Eclipse have a look it's here https://stackoverflow.com/a/12169583/1322642
我做了一个小教程。
如何为 Eclipse 设置所有内容,请看这里https://stackoverflow.com/a/12169583/1322642
Hope it can help you a little bit.
希望它可以帮助你一点点。