Removing console window for Glut/FreeGlut/GLFW?

后端 未结 8 674
醉话见心
醉话见心 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: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.

提交回复
热议问题