I installed cygwin (the latest 1.7.xx?), and then installed eclipse cdt (Juno).
When I tried to build a hello world project, despite eclipse identifying that cygwin was installed, it didn't work.
So I manually added c:\cygwin\bin to the path, which found all the executables in cygwin, including g++, make ld, etc.
Now, eclipse can build the project, but when debugging, gdb starts up and can't find the source code. It claims that it can't find:
/cygdrive/c/users/me/workspace/test1/test1.cc . even though that's exactly where it is. It's as though cygwin's directory system doesn't work.
I can manually load the source from:
c:\users\me\workspace\test1\test1.cc
and the debugger works, but the next time I start a new project, I have to do it again. How do you instruct the eclipse/cygwin combo to correctly find source code?
Alternatively, is Mingw any easier? I have experienced similar problems with eclipse seeing that mingw is there, but build failing because it doesn't find the executable.
Installing gdb[edit] If you are using Linux, you probably already have gdb, but if you are using Windows, you will need to install it. MinGW distributes a Windows version of gdb. You can get the latest mingw installer here which can in turn install gdb.
Set Eclipse for using gdb Select a launch configuration from the list on the left (e.g. C/C++ Application) Open the Debugger tab from the menu on the right. Set GDB debugger to the full path of your gdb binary file (the same used for signing the certificate) Set GDB command file to the full path of your .
Here is how I made it work.
Then when I debug it finds the source file fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With