Author Topic: Just wondering...  (Read 11879 times)

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Just wondering...
« 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.


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

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Just wondering...
« Reply #1 on: November 15, 2010, 08:29:21 pm »
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();
Apply it to src/tools/ConsoleRunner/main.cpp and recompile ^^
Kernel Extremist - PedroM power ©

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Just wondering...
« Reply #2 on: November 16, 2010, 09:36:53 am »
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.


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

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Re: Just wondering...
« Reply #3 on: November 17, 2010, 04:23:18 pm »
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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Just wondering...
« Reply #4 on: November 17, 2010, 05:25:12 pm »
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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Re: Just wondering...
« Reply #5 on: November 17, 2010, 07:32:11 pm »
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...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Just wondering...
« Reply #6 on: November 17, 2010, 07:39:54 pm »
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: ).

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Re: Just wondering...
« Reply #7 on: November 17, 2010, 07:45:56 pm »
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.

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Re: Just wondering...
« Reply #8 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:

Code
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...))

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Just wondering...
« Reply #9 on: November 18, 2010, 05:12:23 pm »
Well good news and bad news.
Good:I can now build a project.
Bad : every time it builds, I get this error:

Code
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Larek Robinson

  • Single posting newcomer
  • *
  • Posts: 9
Re: Just wondering...
« Reply #10 on: November 18, 2010, 07:15:13 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Just wondering...
« Reply #11 on: November 19, 2010, 10:08:11 pm »
I'm not using the bgi library...

Then remove the linker option that tries to link to it.

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.
« Last Edit: November 19, 2010, 10:34:48 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org