Author Topic: Problem with executing compiled program. Please help.  (Read 8675 times)

Offline cshong

  • Single posting newcomer
  • *
  • Posts: 5
Problem with executing compiled program. Please help.
« 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?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Problem with executing compiled program. Please help.
« Reply #1 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).

Offline cshong

  • Single posting newcomer
  • *
  • Posts: 5
Re: Problem with executing compiled program. Please help.
« Reply #2 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?
« Last Edit: June 07, 2008, 03:28:39 pm by cshong »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9557
Re: Problem with executing compiled program. Please help.
« Reply #3 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?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline cshong

  • Single posting newcomer
  • *
  • Posts: 5
Re: Problem with executing compiled program. Please help.
« Reply #4 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.

Offline cybernike

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problem with executing compiled program. Please help.
« Reply #5 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?

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: Problem with executing compiled program. Please help.
« Reply #6 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.
« Last Edit: June 21, 2008, 07:42:14 pm by Deschamps »
Misquotations are the only quotations that are never misquoted

Offline cybernike

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problem with executing compiled program. Please help.
« Reply #7 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?


Offline rynee

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problem with executing compiled program. Please help.
« Reply #8 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?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2594
Re: Problem with executing compiled program. Please help.
« Reply #9 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).

Offline rynee

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problem with executing compiled program. Please help.
« Reply #10 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6788
    • My Best Post
Re: Problem with executing compiled program. Please help.
« Reply #11 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.
« Last Edit: October 08, 2013, 01:23:18 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org