User forums > General (but related to Code::Blocks)
Just wondering...
Larek Robinson:
Hello,
I am a user of Code::Blocks v 10.05 and I was wondering if there was a way to turn off the "process returned..." thing at the closing of a program.
i.e. I write my "Helo World!" program, and the process returns 0. at the end of my program, I see this line:
--- Code: ---Process returned 0 (0x0) execution time : 2.421 x
Press any key to continue.
--- End code ---
I would like to know if there is any way to turn this feature off... and if not, then is there a way to implement it into a future upgrade?
Larek
Folco:
Here is a patch :D
--- Code: ------ main.cpp 2010-11-15 20:24:06.911264000 +0100
+++ main.cpp.new 2010-11-15 20:24:25.521264000 +0100
@@ -131,17 +131,17 @@
gettimeofday(&tv, NULL);
cl = (tv.tv_sec + (double)tv.tv_usec / 1000000) - cl;
- printf("\nProcess returned %d (0x%X) execution time : %0.3f s", ret, ret, cl);
- printf
- (
- "\nPress "
-#ifdef __WXMSW__
- "any key"
-#else
- "ENTER"
-#endif
- " to continue.\n"
- );
+// printf("\nProcess returned %d (0x%X) execution time : %0.3f s", ret, ret, cl);
+// printf
+// (
+// "\nPress "
+//#ifdef __WXMSW__
+// "any key"
+//#else
+// "ENTER"
+//#endif
+// " to continue.\n"
+// );
wait_key();
--- End code ---
Apply it to src/tools/ConsoleRunner/main.cpp and recompile ^^
Jenna:
--- Quote from: Larek Robinson on November 15, 2010, 07:56:41 pm ---Hello,
I am a user of Code::Blocks v 10.05 and I was wondering if there was a way to turn off the "process returned..." thing at the closing of a program.
i.e. I write my "Helo World!" program, and the process returns 0. at the end of my program, I see this line:
--- Code: ---Process returned 0 (0x0) execution time : 2.421 x
Press any key to continue.
--- End code ---
I would like to know if there is any way to turn this feature off... and if not, then is there a way to implement it into a future upgrade?
Larek
--- End quote ---
It's only shown if you run your program through C::B's wrapper.
If you directly run it from a console-window, you only get the output of your program
Larek Robinson:
Thanks, this helped, now I have another problem. for some reason, when I use THIS computer, I cannot for the life of me compile ANY program... I can't switch to another computer, as I'm a student and we can't move... For now, I'm stuck with using another compiler... and it's 5 years old, and C::B is so much better....
I have no clue where to start, because I don't want to mess up the compiler... I've already tried un-/re-installing C::B twice. I have it instaled on my USB drive, and it worked perfectly fine until today. I've restarted my computer, and still nothing... is there a way to dix this? Dev-C++ isn't the preferred solution...
oBFusCATed:
What? I haven't understood anything?
What is your real problem?
Have you read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
or this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F ?
Do you know how to compile things from the command line? If not learn it, it will make your life easier...
Navigation
[0] Message Index
[#] Next page
Go to full version