Go Back   Cyber Tech Help Support Forums > Software > Applications

Notices

Reply
 
Topic Tools
  #1  
Old October 31st, 2009, 12:43 PM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
C++ for Eclipse 3.5

Not sure this is the right thread, but anyway:

I'm trying to use Eclipse as a C\C++ IDE. I've installed Cygwin GCC, g++ and gdb debuggers, and downloaded CTD from the Eclipse 'add software' option.

I made a test prroject with a hello world class, it compiles fine, but doesn't run. This is what I get on the console:

**** Build of configuration Debug for project CTest ****

make all
make: Nothing to be done for `all'.

And this is the debugger error:
'Launching CTest' has encountered a problem.

Error creating session

details: Cannot run program "gdb":launch failed


Help would be appreciated, or at least send me to a forum where I can get help.
Reply With Quote


  #2  
Old October 31st, 2009, 03:54 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
Hi AoGenius,


I use eclipse CDT and haven't run into this issue, but then again I'm not using gdb with it. Have you verified that you can run gdb from a command window and that it is in search path ?
Reply With Quote
  #3  
Old October 31st, 2009, 03:59 PM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
Not really. The install guide had a few explanations on how to make sure Cygwin is activated, but it didn't mention how to do what you said.
Any clue as to how do I check it?
Reply With Quote
  #4  
Old October 31st, 2009, 06:31 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
not off the top of my head. You can setup up a debug configuration (project->properties->run/debug) and point it to where gdb is installed on your system.

I can look into this a little more and try giving you better instructions, but I need to run right now.
Reply With Quote
  #5  
Old November 2nd, 2009, 10:55 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
I'm Back.

Try this...

First find where gdb.exe is located and determine the path to it [something like C:\Program Files\CygWin\bin]
Then right click on 'My Computer' and select Properties.
Switch to the 'Advanced' Tab and click on 'Environment Variables'
in the 'System variables' list find and select 'Path', then click Edit.
Add the path to gdb to this list, remebering to use a ; to separate it from the existing list.

Exiting out of all the dialogs, using OK.

Open a new command window and type in gdb. This should start the gdb debugger from the command line, letting us know it is correctly in the path. [type in quit to exit it]

Once that works, restart eclipse and it should be able to find gdb.
Reply With Quote
  #6  
Old November 2nd, 2009, 11:05 PM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
I did that right after installing Cygwin... I'm beginning to think the Cygwin install went bad or something.
Reply With Quote
  #7  
Old November 3rd, 2009, 01:34 AM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
Could you find gdb.exe on disk?
Can you run it from a command prompt using its full path? [such as C:\Program/ Files\cywin\bin\gdb.exe]

BTW - what version of Windows are you using?
Reply With Quote
  #8  
Old November 3rd, 2009, 02:20 AM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
yeah, it works fine that way...
Reply With Quote
  #9  
Old November 3rd, 2009, 06:17 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
How are you launching eclipse?
Reply With Quote
  #10  
Old November 4th, 2009, 03:16 PM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
through a windows shortcut... Not through command or anything if that's what you meant.
Reply With Quote
  #11  
Old November 4th, 2009, 11:44 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
Is it a shortcut directly to the eclipse exe or to a script that starts eclipse?
Have you restart your system since you changed the system path to include the path to GDB?
Reply With Quote
  #12  
Old November 5th, 2009, 09:45 AM
AoGenius AoGenius is offline
New Member
 
Join Date: Apr 2006
O/S: Windows XP Home
Location: Israel
Age: 29
Posts: 20
a direct shortcut.

I've restarted the laptop, reinstalled eclipse and cygwin and still get the same error.
Reply With Quote
  #13  
Old November 5th, 2009, 09:57 PM
z1p's Avatar
z1p z1p is offline
Cyber Tech Help Moderator
 
Join Date: Oct 2004
O/S: Windows Vista 64-bit
Location: Massachusetts
Posts: 6,667
Can you start a command window and see if you can run gdb from there? If so, run eclipse from the command window and see if it can then find gdb.
Reply With Quote
Reply

Bookmarks

Topic Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT +1. The time now is 09:17 AM.