How to hide console window of a Go program on Windows -


i tried various ways of creating go program displays either messagebox or standalone gui window. if write in c / c++ define winmain, leave out main , go. seems me define main function console window created automatically. , main function compulsory.

package main func main() { ... } 

to avoid tried example creates winmain

func winmain(wproc uintptr) {     hinstance := getmodulehandle(nil)     ... } 

but effect same: empty console window and gui window: enter image description here

add -ldflags -h=windowsgui go build/install command line. you'll see console window absent:

enter image description here


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -