Home >Backend Development >Golang >Building golang applications using the fyne package for Windows
In this article, php editor Xiaoxin introduces how to build golang applications using the fyne package for Windows. Fyne is an easy-to-use, cross-platform GUI toolkit for building native applications. It provides a simple API and rich components that enable developers to quickly create beautiful, responsive user interfaces. Through this article, you will learn how to install the fyne package in a Windows environment and use it to build your own golang applications. Whether you are a beginner or an experienced developer, this article will provide you with detailed steps and sample code to help you successfully complete the development of your application.
Hi everyone, I want to build my fyne gui application for Microsoft Windows machine, when I try to build it using next command
env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build .
I get this error message #runtime/cgo gcc: error: unrecognized command-line option ‘-mthreads’; Are you referring to “-pthread”? y
So I need to build this application for Windows and make sure that the application contains a GUI built using the fyne.io package I was searching while building a (fyne) application for Windows and I found this https ://developer.fyne.io /started/cross-compiling
I need an explanation for me I think there is a way to build an application using docker but I have no background with docker? The last solution for me was to ask on StackOverflow, so I'm using a Linux machine and I want to build the application for Microsoft Windows.
Thank you for your help and thanks
Follow the instructions on that page, your command snippet is missing the CC
environment to reference the C compiler for Windows.
Once sorted it should work. As you noticed, fyne-cross is available as long as Docker is installed. No setup required, just standard download and fyne-cross "go get" and execute the commands shown in the documentation.
The above is the detailed content of Building golang applications using the fyne package for Windows. For more information, please follow other related articles on the PHP Chinese website!