0

Always when I make a graphical interface, either with opengl or anything else the windows console is appearing next to it. And that's not very good. Even using freeConsole() is kind of bad to keep showing the console for a few milliseconds. When I used visual studio there was a way to make your program become a window app instead of a console app.

I tried using pragma comment. But it does not work perfectly. It looks the same as freeConsole().

1 Answers1

1

In order to suppress the console when you compile a graphical program on Windows with MinGW, you need to specify that you are using the windows subsystem. To do that you pass that information as a linker option, e.g.

gcc/g++ ...your compile string... -Wl,-subsystem,windows

Adding -Wl,-subsystem,windows will tell the linker to compile as a windows program rather than a console program.

David C. Rankin
  • 81,885
  • 6
  • 58
  • 85