Author Topic: Newby here with a question  (Read 3430 times)

Offline spectrum2me

  • Single posting newcomer
  • *
  • Posts: 8
Newby here with a question
« 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
« Last Edit: June 02, 2016, 09:59:20 pm by spectrum2me »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Newby here with a question
« Reply #1 on: June 02, 2016, 11:24:30 pm »
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!]

Offline spectrum2me

  • Single posting newcomer
  • *
  • Posts: 8
Re: Newby here with a question
« Reply #2 on: June 04, 2016, 03:46:08 am »
where is that?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Newby here with a question
« Reply #3 on: June 04, 2016, 09:25:08 am »
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Newby here with a question
« Reply #4 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...

Offline spectrum2me

  • Single posting newcomer
  • *
  • Posts: 8
Re: Newby here with a question
« Reply #5 on: June 07, 2016, 03:49:51 am »
It does pop up and disappears quickly so yeah technically I guess it runs.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Newby here with a question
« Reply #6 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