Code::Blocks Forums
User forums => Help => Topic started by: Shazey on March 11, 2012, 07:21:26 pm
-
Is there a way to make a *.exe console application?
I tried running the application in bin/Debug but it just flashes and closes. I have no clue what to do :/
-
Project -> Properties -> Build targets -> Type == console
Project -> Properties -> Build targets -> Pause when the execution ends
Next time please read the manual.
-
Did that before, still doesn't work.
-
Did that before, still doesn't work.
If you run a console-application from (e.g.) windows explorer (I assume you are on windows), that does nothing but write some text on console (like the default hello-world example), you will see a console window flashing, long enough to display the text and close.
if you run it from commandline (cmd.exe in windows), you will see the output.
ALternatively you can run it through C::B and make sure the settings are like oBFusCATed has posted.
-
So, there is no other way than to run it through the Command Prompt?
-
ALternatively you can run it through C::B and make sure the settings are like oBFusCATed has posted.
Another option is to put getch(); or while(1); at the end to see if there isn't some other error.
Like missing dll for example.
-
Thanks for your help guys, I finally managed to make it work :)
-
How, so it would be useful for the others having the same problem?
-
I used the Command prompt way. What I did is I added the cmd.exe in the folder where my application is so it is easier ;) :D