News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Newby here with a question

Started by spectrum2me, June 02, 2016, 09:57:03 PM

Previous topic - Next topic

spectrum2me

Okay so the first "hello world" runs in the ide fine.  But does not run as a stand alone .exe why?
Windoze 8

oBFusCATed

Probably some dll is missing use dependency walker to find out which one.
(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!]

spectrum2me


oBFusCATed

(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!]

BlueHazzard

Quote from: 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
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...

spectrum2me

It does pop up and disappears quickly so yeah technically I guess it runs.

BlueHazzard

Quote from: spectrum2me on June 07, 2016, 03:49:51 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