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:
Process returned 0 (0x0) execution time : 2.421 x
Press any key to continue.
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
Here is a patch :D
--- 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();
Apply it to src/tools/ConsoleRunner/main.cpp and recompile ^^
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:
Process returned 0 (0x0) execution time : 2.421 x
Press any key to continue.
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
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
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...
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...
Okay, what don't you understand? And no, I don't know how to compiler things from the command line...... I don't wanna sound like a complete idiot... but can someone teach me?
Anyways, my problem is this:
•I have a C++ program. I want to build and run it.
•I press 'F9' and nothing happens.
•I try to build it under the 'build' tab... nothing happens/
•no matter what I try to do, my project will NOT build.
••I can save my work, and do anything but build it.
What I've done to troubleshoot:
•uninstall/reinstall
•reboot my computer
I don't know how to make it work...
Make sure the compiler installation directory and the executables are set correctly in "Setup -> Compiler and debugger -> [the compiler yous use] -> Toolchain executables"
and that you are allowed to create executables in the output directory (the last can be a problem on win7 :evil: ).
Creating an executable is not a problem. I'm in a different class right now, but i'll check it out when I get in class tomorrow. Thanks Jens.
Well good news and bad news.
Good:I can now build a project.
Bad : every time it builds, I get this error:
ld.exe||cannot find -lbgi|
||=== Build finished: 1 errors, 0 warnings ===|
It does this for every project.... how would one fix this problem?
>.>
((off topic: I feel like such an idiot for asking some questions that are probably easily answered, so please don't give me crap about this, nobody has yet, but I've tried elswhere, and had noting but crap thrown in my face...))
Quote from: Larek Robinson on November 18, 2010, 04:55:46 PM
Well good news and bad news.
Good:I can now build a project.
Bad : every time it builds, I get this error:
ld.exe||cannot find -lbgi|
||=== Build finished: 1 errors, 0 warnings ===|
It does this for every project.... how would one fix this problem?
>.>
((off topic: I feel like such an idiot for asking some questions that are probably easily answered, so please don't give me crap about this, nobody has yet, but I've tried elswhere, and had noting but crap thrown in my face...))
1. Do you need the Library "bgi"
If no, then remove it from the Linker or Maybe the Compiler Options in the Project or the Compiler and Debugger settings
If yes, verify the library is installed. Verify the correct path to the library is in the Linker Options.
If not installed, install it.
If you do NOT know if it is installed; asked for help on the site that supports your Compiler; this site does NOT support any compilers!
Tim S.
I don't know if it's installed, so I'll go ask on the GCC site. Otherwise, to my knowlege, I'm not using the bgi library... Thanks, anyways, Tim.
Quote from: Larek Robinson on November 18, 2010, 07:15:13 PM
I'm not using the bgi library...
Then remove the linker option that tries to link to it.
Quote from: stahta01 on November 18, 2010, 05:12:23 PM
1. Do you need the Library "bgi"
If no, then remove it from the Linker or Maybe the Compiler Options in the Project or the Compiler and Debugger settings
Tim S.