Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: spectrum2me on June 02, 2016, 09:57:03 pm

Title: Newby here with a question
Post by: spectrum2me on June 02, 2016, 09:57:03 pm
Okay so the first "hello world" runs in the ide fine.  But does not run as a stand alone .exe why?
Windoze 8
Title: Re: Newby here with a question
Post by: oBFusCATed on June 02, 2016, 11:24:30 pm
Probably some dll is missing use dependency walker to find out which one.
Title: Re: Newby here with a question
Post by: spectrum2me on June 04, 2016, 03:46:08 am
where is that?
Title: Re: Newby here with a question
Post by: oBFusCATed on June 04, 2016, 09:25:08 am
http://lmgtfy.com/?q=dependency+walker
Title: Re: Newby here with a question
Post by: BlueHazzard on June 04, 2016, 12:23:32 pm
Okay so the first "hello world" runs in the ide fine.  But does not run as a stand alone .exe why?
Windoze 8
What does "not run" mean? Does it pop up and closes immediately? or does it crash? or does happen nothing? Is there some error message? some more info would be nice, so we can help you...
Title: Re: Newby here with a question
Post by: spectrum2me on June 07, 2016, 03:49:51 am
It does pop up and disappears quickly so yeah technically I guess it runs.
Title: Re: Newby here with a question
Post by: BlueHazzard on June 07, 2016, 10:36:21 am
It does pop up and disappears quickly so yeah technically I guess it runs.
exactly, this is no crash, your program works as expected.....

Look at the code... after the return statement your main loop exits, and the console window closes. Codeblocks adds some convenients to the execution and keeps the console window open, but this has nothing to do with your program. If you run your program outside c::b you don't have this feature and have to add it by yourself...

https://www.google.de/?gws_rd=ssl#q=c+program+closes+immediately