在 Windows 下使用 Eclipse CDT 和 Cygwin
我正在尝试将 Eclipse CDT 与 Cygwin 一起使用,但调试器出现问题。我做了以下事情: - 安装Eclipse CDT - 安装了带有 gcc、g++ make 和 gdb 的 Cygwin - 将 c:\cygwin\bin 添加到 PATH - 在 Eclipse 中创建了一个新的 Hello World 应用程序 Eclipse
编译进展顺利。第一个问题是我必须在运行配置中手动设置可执行文件。完成此操作后,我跑步也起作用了。但是当我尝试调试时,出现以下错误:
当我切换到调试视角时,我可以看到以下内容:
我尝试了不同的调试配置,但总是得到相同的结果。
I am trying to use Eclipse CDT with Cygwin, but I have problems with the debugger. I have done the following:
- installed Eclipse CDT
- installed Cygwin with gcc, g++ make and gdb
- added c:\cygwin\bin to PATH
- created a new Hello World application in Eclipse
Compiling went well from Eclipse. The first problem was that I had to set the executable manually in the run configuration. Having done this, I running also worked. But when I try to debug, I get the following error:
When I switch to debug perspective, I can see the following:
I tried different debug configurations, but I always get the same result.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,确保 gdb 位于c:\cygwin\bin。我相信在 cygwin 上执行 which gdb 可能会帮助你做到这一点。
现在,不要将此信息添加到 PATH 并使其可供所有 Windows 应用程序使用,而是尝试将其添加到 Eclipse 内的项目设置中,就像这个人所做的那样:
http://www.benjaminarai.com/benjamin_arai/index.php ?display=/eclipsecygwingcc.php
First, make sure gdb is located on c:\cygwin\bin. I believe executing which gdb on cygwin might help you do that.
Now, instead of adding this information to PATH and making it available to all your Windows applications, try adding it to your project settings inside Eclipse, like this guy did:
http://www.benjaminarai.com/benjamin_arai/index.php?display=/eclipsecygwingcc.php