How do I build plugin Go in windows?

Issue

I wrote a simple plugin in Go, it gives the following error when I execute the go build -buildmode=plugin
command:

-buildmode=plugin not supported on windows/amd64

Version go is :go1.18.1
windows 10

Solution

As error message tells you plugins are not supported on Windows. Only supported platforms are Linux, FreeBSD and macOS. See https://pkg.go.dev/plugin :

Currently plugins are only supported on Linux, FreeBSD, and macOS.

Answered By – blami

Answer Checked By – Robin (GoLangFix Admin)

Leave a Reply

Your email address will not be published.