SFML community forums

Help => Window => Topic started by: Howitzer21 on February 09, 2012, 05:56:11 pm

Title: How can you avoid showing the console in the background?
Post by: Howitzer21 on February 09, 2012, 05:56:11 pm
I'm going through the tutorials right now, and I just started the Window tutorials.  Essentially there's an issue with a console being shown, even when you're using the Window stuff.  I want to completely avoid this if possible.  In the first Window tutorial, the site did mention using WinMain to correct this problem on Windows (the OS I'm experiencing the problem on); but they're not specific at all about it, and even pulling it out and getting everything to compile right, I'm still seeing the background console.  How specifically can I rectify this?  Thanks!
Title: How can you avoid showing the console in the background?
Post by: Tadayoshi on February 09, 2012, 06:38:42 pm
Just set the Build Target to "GUI Application" instead of "Console Application"

In CodeBlocks for example in Project->Settings->Build targets->Type

I personally let the Debug build as an Console app so you can show information you need for debugging etc. And the Release build as an GUI Application
Title: How can you avoid showing the console in the background?
Post by: Noxalus on February 09, 2012, 07:15:22 pm
Hi !

For Visual Studio, you can watch this video at 11:00: here (http://www.youtube.com/watch?annotation_id=annotation_768168&v=MgDFGkFDsbg&src_vid=fMNlUfvWOwA&feature=iv) ;)
Title: How can you avoid showing the console in the background?
Post by: Howitzer21 on February 09, 2012, 07:20:41 pm
It's Code::Blocks.  Thanks though for the last reply.  As for the first one, that's kind of interesting; evidently a blank project maps directly to a console one?

Thanks for the replies.
Title: How can you avoid showing the console in the background?
Post by: TechRogue on February 09, 2012, 08:51:35 pm
In Codeblocks you can change it in your project's Build targets:

Menu bar -> Project -> Properties
On the "Build targets" tab, change your project type from "Console application" to "GUI application".

You can change it separately in Debug / Release mode, so I usually have the console show up when I'm debugging and hidden for a release build.

Edit: I awkwardly posted the same advice as Tadayoshi did yesterday.  :oops:
Title: How can you avoid showing the console in the background?
Post by: Walker on February 10, 2012, 09:11:18 am
Quote from: "Tadayoshi"
I personally let the Debug build as an Console app so you can show information you need for debugging etc. And the Release build as an GUI Application


Do this! :)