Author Topic: the executable file on bin/Debug is not working  (Read 4130 times)

Offline Mugiwara303

  • Single posting newcomer
  • *
  • Posts: 3
    • TheGameScene
the executable file on bin/Debug is not working
« on: July 04, 2016, 02:49:53 am »
hi, i was trying to get the .exe file of a simple "Hello World" projet on bin/Debug but when i double click on it it shows and disappear quickly! why it is not working? thanks in advance

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: the executable file on bin/Debug is not working
« Reply #1 on: July 04, 2016, 09:01:03 am »
Because it is probably a console program and this is how they work. You have to start it inside an open cmd.exe window to see its output.
(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 Mugiwara303

  • Single posting newcomer
  • *
  • Posts: 3
    • TheGameScene
Re: the executable file on bin/Debug is not working
« Reply #2 on: July 04, 2016, 03:25:45 pm »
ok thanks i get it now, is there a way to make the .exe file work and prompt the cmd console?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: the executable file on bin/Debug is not working
« Reply #3 on: July 04, 2016, 09:14:17 pm »
What do you mean by prompt?
(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

Offline Mugiwara303

  • Single posting newcomer
  • *
  • Posts: 3
    • TheGameScene
Re: the executable file on bin/Debug is not working
« Reply #5 on: July 05, 2016, 02:54:20 am »
i mean to make the console work just by executing the .exe file

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: the executable file on bin/Debug is not working
« Reply #6 on: July 05, 2016, 03:14:17 am »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tedlz123

  • Single posting newcomer
  • *
  • Posts: 2
Re: the executable file on bin/Debug is not working
« Reply #7 on: July 27, 2016, 12:44:52 pm »
Add also, you can add a statement system("pause"); before the main function returns.


Sent from my iPhone using Tapatalk