Removing console window for Glut/FreeGlut/GLFW?

后端 未结 8 669
醉话见心
醉话见心 2021-02-03 13:42

Under Visual C++, I have played around with Glut/FreeGlut/GLFW. It seems that everyone of these projects adds a CMD window by default. I tried removing it going under:

相关标签:
8条回答
  • 2021-02-03 14:18

    Most linkers support options that automatically remove the console startup code.

    I think on GCC it's called -mwindows

    0 讨论(0)
  • 2021-02-03 14:19

    My project just has a main, (no WinMain) and to disable console, I just set Linker->System->SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" instead of "Console (/SUBSYSTEM:CONSOLE)" and the console goes away.

    You don't need to mess with the Preprocessor Definitions to remove the console window.

    I know my answer is a few years late, but I hope it helps.

    0 讨论(0)
提交回复
热议问题