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

Author Topic: Writing to SFML Console  (Read 6728 times)

0 Members and 1 Guest are viewing this topic.

KorolBoxta

  • Newbie
  • *
  • Posts: 4
    • View Profile
Writing to SFML Console
« on: June 14, 2017, 10:15:06 am »
Hi,

I want to know if the SFML console can/should be used to output text to.

There are lots of threads about hiding it but i'd actually like to throw in some debug stuff if that's appropriate.

std::cout doesn't seem do anything.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11027
    • View Profile
    • development blog
    • Email
Re: Writing to SFML Console
« Reply #1 on: June 14, 2017, 10:18:29 am »
There's no such thing as SFML console. ;)

The terminal/command prompt that opens has to do with the subsystem you use.
std::cout works fine for printing things to the terminal.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

KorolBoxta

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Writing to SFML Console
« Reply #2 on: June 14, 2017, 10:19:14 am »
Ok must be a VS setting somewhere, thanks.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Writing to SFML Console
« Reply #3 on: June 24, 2017, 08:46:42 am »
In Visual Studio just make sure your debug build has the subsystem target set to "CONSOLE" (which gives you the console window by default) and your release build is set to "WINDOWS" (which hides the console window by default).

 

anything