简体   繁体   English

在Windows下通过Cygwin使用Eclipse CDT

[英]Using Eclipse CDT under Windows with Cygwin

I am trying to use Eclipse CDT with Cygwin, but I have problems with the debugger. 我试图将Eclipse CDT与Cygwin一起使用,但是调试器出现问题。 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 我已完成以下操作:-安装了Eclipse CDT-使用gcc,g ++ make和gdb安装了Cygwin-向PATH添加了c:\\ cygwin \\ bin-在Eclipse中创建了一个新的Hello World应用程序

Compiling went well from Eclipse. 从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. 我尝试了不同的调试配置,但始终得到相同的结果。

First, make sure gdb is located on c:\\cygwin\\bin . 首先,确保gdb位于c:\\ cygwin \\ bin上 I believe executing which gdb on cygwin might help you do that. 我相信在cygwin上执行哪个gdb可能会帮助您做到这一点。

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 现在,不要将此信息添加到PATH并使其对所有Windows应用程序都可用,而是尝试将其添加到Eclipse内部的项目设置中,就像这个家伙那样: http : //www.benjaminarai.com/benjamin_arai/index.php? display = / eclipsecygwingcc.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM