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

Author Topic: Extra Window  (Read 1403 times)

0 Members and 1 Guest are viewing this topic.

DrewCelery

  • Newbie
  • *
  • Posts: 6
    • View Profile
Extra Window
« on: June 27, 2012, 06:07:42 pm »
Hi, I've been making a game with SFML 1.6 on Visual Studio 2008 (Windows 7 x64, "-s" libraries), and I'm having a minor problem.

While the game builds and plays just fine, a blank Win32 window shows up before the render window. It seems to do simple things (ie. if theres an error, it prints it), but there is really no use for it.

I installed it exactly according to the tutorial on the website (and just double-checked to make sure), and I don't think it's a problem with my code, because if I compile the Pong or PostFX samples, the window still appears, while it doesn't on the precompiled binaries.

I'm new to SFML (and C++ in general), so I'm sure it's a simple user error, but any help would be greatly appreciated.

Thank you!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10914
    • View Profile
    • development blog
    • Email
Re: Extra Window
« Reply #1 on: June 27, 2012, 06:45:51 pm »
It seems you're quite a young person, since you don't know that this little window is called a command line, which is the 'leftover' of DOS (predecessor of Windows). Obviously that 'leftover' is not a bad thing and by claims of Linux users more powerfull than any GUI application, although in the Unix world its more often refered to as shell.
Anyways welcome to the world of SFML.

I'm not sure about how SFML 1.6 handles this kind of stuff and I strongly advice you to switch to SFML 2.0rc since the 1.6 version is quite outdated and has some serious bugs.

In SFML 2 you just link against sfml-main(-d).lib and then set the project property Linker->System->Subsystem to 'Window' instead of 'Console'.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

aBallofWin

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Extra Window
« Reply #2 on: June 29, 2012, 03:23:35 pm »
You could either look for some C++ code to hide the console window or you could build it to be a GUI application. I don't know about VS but in CodeBlocks you can change the properties of a project to build it as a GUI application (either in Release/Debug).

 

anything