Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to reset running program?(program reset )
How to reset running program? [message #1749361] Mon, 05 December 2016 20:05 Go to next message
Anne Creek is currently offline Anne CreekFriend
Messages: 275
Registered: September 2014
Senior Member
I have a simple test program, runs fine and terminates as far as I can tell.
But when I try to "run" it again I get a message " my program ( already running)".
About the only way I can restart it is to change something, than "Build All" , than I can do "Run" again.

int main( int argc, char* argv[])
{
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!


int value = 50;
int value2 = 0;
// namedWindow("main1",WINDOW_AUTOSIZE | WINDOW_OPENGL);
namedWindow("main2",WINDOW_OPENGL);
namedWindow("main3",WINDOW_AUTOSIZE);
waitKey(0);
destroyAllWindows();
//help();
return (0);
}

Re: How to reset running program? [message #1749363 is a reply to message #1749361] Mon, 05 December 2016 20:53 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Where do you get the message already running from? Is it an error or a hover over the run (or debug) button like this:

index.php/fa/27788/0/

If it is like that screenshot it means you have not terminated your last run/debug session. It is not an error, just a reminder that you still have it running. It is not an error because you can run the same program multiple times if you want to.

So you should terminate the program first (press the red square in the toolbar or on the console view):

index.php/fa/27787/0/
Re: How to reset running program? [message #1749366 is a reply to message #1749363] Mon, 05 December 2016 21:00 Go to previous messageGo to next message
Anne Creek is currently offline Anne CreekFriend
Messages: 275
Registered: September 2014
Senior Member
It is a "tool tip" style message when I position mouse over "Run".
Were should I see this "red button" to terminate the run?
Sorry, just noted I should look at console view / output. Will try that.

My test program is designed to terminate / return when I press any key on keyboard.

[Updated on: Mon, 05 December 2016 21:02]

Report message to a moderator

Re: How to reset running program? [message #1749370 is a reply to message #1749366] Mon, 05 December 2016 21:59 Go to previous message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Glad you made some progress.

Quote:
My test program is designed to terminate / return when I press any key on keyboard.


OK, I guess you have identified an issue here. Is waitKey listening on stdin or on a key pressed in a window. If it is on stdin then you should note that the console view in Eclipse is a line-buffered console. Nothing is sent to the program until Enter is pressed.

Previous Topic:no underscore in Oxygen edit view
Next Topic:Problem with eclipse while running simple c program
Goto Forum:
  


Current Time: Thu Apr 25 03:38:20 GMT 2024

Powered by FUDForum. Page generated in 0.03532 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top