Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: cshong on June 07, 2008, 07:04:03 am

Title: Problem with executing compiled program. Please help.
Post by: cshong on June 07, 2008, 07:04:03 am
The following problem does not occured in Microsoft Visual C++ IDE.

I'm using Code::Blocks 8.02.

I use 'int main()' to declare the main function. I had input 'return 0' at the end of the main() function.

When I try to execute my compiled program with Code::Blocks, my program show "Process returned 0 (0x0) execution time....". I don't want this statement to be displayed.

Can I solve this problem without modifying my source code?
Title: Re: Problem with executing compiled program. Please help.
Post by: Ceniza on June 07, 2008, 08:24:56 am
Your executable doesn't show that. It's a program Code::Blocks uses to run your program through that displays that message. You can remove that behavior by clicking on Project -> Properties... -> [Build targets]. Select your target and _uncheck_ Pause when execution ends. AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).
Title: Re: Problem with executing compiled program. Please help.
Post by: cshong on June 07, 2008, 03:21:09 pm
Your executable doesn't show that. It's a program Code::Blocks uses to run your program through that displays that message. You can remove that behavior by clicking on Project -> Properties... -> [Build targets]. Select your target and _uncheck_ Pause when execution ends. AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).

Thanks for your reply. But your solution will disable "Press any key to continue". I want the program to ONLY DISPLAY "Press any key to.." but NOT DISPLAY "Process returned 0 (0x0) execution...." at the end of execution.

I'm scared that my lecturer will deduct my marks if he see "Process returned 0 (0x0) execution...." in the screenshot of my program, and I must run it inside the IDE.

Am I able to do this without modifying my source code?
Title: Re: Problem with executing compiled program. Please help.
Post by: MortenMacFly on June 07, 2008, 04:23:14 pm
Am I able to do this without modifying my source code?
Why don't you just launch your application from the command line / prompt?!
Title: Re: Problem with executing compiled program. Please help.
Post by: cshong on June 09, 2008, 09:38:59 am
Am I able to do this without modifying my source code?
Why don't you just launch your application from the command line / prompt?!

Thanks for your suggestion. I appreciate it.
Title: Re: Problem with executing compiled program. Please help.
Post by: cybernike on June 21, 2008, 10:05:45 am
I actually want the opposite. Why when I run a compiled program in code::blocks, it doesn't show the execution time? Where can I enable that?
Title: Re: Problem with executing compiled program. Please help.
Post by: Deschamps on June 21, 2008, 07:40:27 pm
I actually want the opposite. Why when I run a compiled program in code::blocks, it doesn't show the execution time? Where can I enable that?

If your run your app inside C::B, then you'll see the total execution time (i.e. when you close your app) in the Build log tab (if you don't have the Logs panel visible, you could see it pressing F2 or using menu View -> Logs). If you're looking for a timing during execution, then I don't know the answer :)

Regards.
Title: Re: Problem with executing compiled program. Please help.
Post by: cybernike on June 21, 2008, 08:58:54 pm
I am actually looking for something like this "Process returned 0 (0x0)   execution time : 0.055 s" at the end of execution for a console program.

My windows C::B shows that, but not my Linux version. Any idea?

Title: Re: Problem with executing compiled program. Please help.
Post by: rynee on October 04, 2013, 10:54:53 pm
Well it's been about 5 years since this thread. Is there any way to disable this
Quote
Process returned 0 (0x0)   execution time : 0.987 s
Press any key to continue.
output as of 2013?
Title: Re: Problem with executing compiled program. Please help.
Post by: BlueHazzard on October 06, 2013, 08:00:12 pm
first of all, this is grave desecration. This thread is more then five years old....

second:
Your executable doesn't show that. It's a program Code::Blocks uses to run your program through that displays that message. You can remove that behavior by clicking on Project -> Properties... -> [Build targets]. Select your target and _uncheck_ Pause when execution ends. AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).
Title: Re: Problem with executing compiled program. Please help.
Post by: rynee on October 08, 2013, 12:04:33 am
Quote
AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).

Right, so am I to assume that in the last 5 years no one has fixed this yet?
Title: Re: Problem with executing compiled program. Please help.
Post by: stahta01 on October 08, 2013, 01:20:31 am
Quote
AFAIK there's no way to disable that behavior when compiling and running a single file (no Project).

Right, so am I to assume that in the last 5 years no one has fixed this yet?

Right, so I am to assume you are a idiot, who can NOT create a CB project or use a makefile.
Or use, the tool menu or the Toolplus plugin.

Tim S.