-buildmode=c-shared not supported on windows/amd64
See original GitHub issueIm using go 1.9.3 and just tried to do this with this simple file :
package main
import "C"
import (
"fmt"
)
//export add
func add(a, b int) int {
var sum int = a + b
fmt.Println("DONE")
return sum
}
func main() {}
But kept getting the error above. Is there any way to fix this? Am I using the wrong command?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Builmode on Windows - Getting Help - Go Forum
Hi, I'm trying to build a go shared lib. under Windows x64, but each time I do ... I get -buildmode=shared not supported...
Read more >Support for -buildmode=shared on darwin/amd64
Are there any plans to support -buildmode=shared for platform darwin/amd64 ? > Or possible timeframe / target version of language ? I'm not...
Read more >go "-buildmode=c-shared" compiled DLL is not working on ...
I compiled for windows/amd64 with following command: go build -o add.dll -buildmode=c-shared ./add.go. The compilation generates add.dll, ...
Read more >go command - cmd/go - Go Packages
Supported only on linux/amd64, linux/arm64 and only with Clang/LLVM as the ... be linked against shared libraries previously created with -buildmode=shared.
Read more >src/cmd/go/build.go - go - Git at Google
The '.exe' suffix is added when writing a Windows executable. ... fatalf("-buildmode=shared not supported on %s\n", platform). } codegenArg = "-dynlink".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Since Go 1.10, it works also with Windows. Thus, this issue could be closed.