Skip to content

Go built console type of application #74

Answered by Jacalz
Dr-Hex asked this question in Q&A
Discussion options

You must be logged in to vote

This is just Windows being silly with their defaults.

In order to not build with a console attached, you need to pass -H=windowsgui to the ldflags when building (go build -ldflags="-H=windowsgui"). Release builds want to pass -s -w to the ldflags (-ldflags="-s -w"). If you want both, you can add them both to the ldflags (it is the same for all Go applications and all Windows binaries require the flag to not open a console). It might be simpler to just use the fyne command to package and install per https://developer.fyne.io/started/packaging.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Dr-Hex
Comment options

@Jacalz
Comment options

@Jacalz
Comment options

@Jacalz
Comment options

Answer selected by Jacalz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #72 on March 20, 2023 15:44.