Imgui: How to disable console/command-prompt appearing with my Windows app?

Created on 30 Aug 2017  路  7Comments  路  Source: ocornut/imgui

wtf

As you can see along with the main window, there is an empty cmd window. Is there any way to disable that ?

Thanks for the help . I am very new to imgui.

Most helpful comment

OK I found out in windows adding this above the main function will fix the problem.

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")

And it did, but one question remains, how to build this for x64

All 7 comments

That is not an artifact of imgui but how the executable was built. With Visual Studio, it is most likely because the subsystem is set to CONSOLE

I tried changing the Subsystem to all other values possible. All I am getting is lot of linker errors. I tried changing the Architecture(default Win32) to x64 which also spit out a lot of errors. Only setting the subsystem to CONSOLE and architecture to Win32 works. Does this also mean if I want to use imgui with my CGAL build which is x64, that won't be possible ?

Thanks for the reply thou.

OK I found out in windows adding this above the main function will fix the problem.

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")

And it did, but one question remains, how to build this for x64

This question has a absolutely nothing to do with the dear imgui library. Please ask on eg: stackoverflow.

@ocornut Building imgui in x64 produces linker errors . Does that have anything to do with dear imgui ?

Could you provide the linker errors you get, and what exactly did you try to build with what compiler?

Oops never mind , changing the subsystem also fixed architecture trouble I think. It compiles without errors . I guess restarting Visual Studio fixed it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noche-x picture noche-x  路  3Comments

ghost picture ghost  路  3Comments

dowit picture dowit  路  3Comments

ocornut picture ocornut  路  3Comments

BlackWatersInc picture BlackWatersInc  路  3Comments