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().