Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How can you avoid showing the console in the background?  (Read 2291 times)

0 Members and 1 Guest are viewing this topic.

Howitzer21

  • Newbie
  • *
  • Posts: 16
    • View Profile
How can you avoid showing the console in the background?
« 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!

Tadayoshi

  • Newbie
  • *
  • Posts: 4
    • View Profile
How can you avoid showing the console in the background?
« Reply #1 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

Noxalus

  • Newbie
  • *
  • Posts: 9
    • View Profile
How can you avoid showing the console in the background?
« Reply #2 on: February 09, 2012, 07:15:22 pm »
Hi !

For Visual Studio, you can watch this video at 11:00: here ;)

Howitzer21

  • Newbie
  • *
  • Posts: 16
    • View Profile
How can you avoid showing the console in the background?
« Reply #3 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.

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
How can you avoid showing the console in the background?
« Reply #4 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:

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
How can you avoid showing the console in the background?
« Reply #5 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! :)

 

anything