How to prevent creating console window?

There is simple GUI toolkit:
For Linux creates two windows, but for Windows first creates console.

I guess there is no way of controlling this from inside Go. As long as Windows considers the app a console app it will open a console window.

If I remember correctly (I haven’t used Windows for quite a while now), you can tell Windows to open the console in a minimized window. Right-click the exe and inspect the properties, I think the relevant setting is somewhere in there.

You can set the relevant bit in the header when building:

go build -ldflags "-H windowsgui"


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.