Author Topic: Program runs in codeblocks but not from the executable.  (Read 256 times)

Offline Midnite

  • Single posting newcomer
  • *
  • Posts: 2
Program runs in codeblocks but not from the executable.
« on: September 16, 2017, 11:39:10 pm »
Hello
So I just started learning c++ and I tried to create a simple hello world program, it builds and runs just fine in code blocks, running it from cmd seems to be working aswell but when I doubleclick the .exe it just quickly flashes an empty window on the screen. I realize this question has been asked before but I wasn't able to find a solution in any of the old threads.

 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Program runs in codeblocks but not from the executable.
« Reply #1 on: September 17, 2017, 12:20:40 am »
Hello
So I just started learning c++ and I tried to create a simple hello world program, it builds and runs just fine in code blocks, running it from cmd seems to be working aswell but when I doubleclick the .exe it just quickly flashes an empty window on the screen. I realize this question has been asked before but I wasn't able to find a solution in any of the old threads.

This is likely because that is how you wrote your program.
You need to ask on a site that teaches programming.
Link to this site rules: http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org


Offline Midnite

  • Single posting newcomer
  • *
  • Posts: 2
Re: Program runs in codeblocks but not from the executable.
« Reply #3 on: September 17, 2017, 02:23:14 am »
Right, sorry for asking stupid questions, I didn't want to move forward until I was sure I didn't fuck up some compiler settings or something.
Thank you

You need to ask on a site that teaches programming.
Link to this site rules: http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.
Gotcha, wrong place.
« Last Edit: September 17, 2017, 02:32:02 am by Midnite »