You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem does reproduce with the latest release
.
OS AND HARDWARE : Windows 10 AMD64
I tried building my sum.go file using go build -buildmode=c-shared -o sum.so sum.go.
Instead of it completing, I got this error -buildmode=c-shared not supported on windows/amd64
This is the 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() {}
I expected the command to go through and create a sum.so and a sum.h file
Instead I got --> sum.go file using go build -buildmode=c-shared -o sum.so sum.go.
Im doing this so I can import my golang functions into python, is there a way to fix this? Am I using the wrong command, or the wrong file configurations? Thank you.
The text was updated successfully, but these errors were encountered:
Support for the c-shared build mode on Windows is new in the upcoming Go 1.10 release. I encourage you to try to 1.10 release candidate that was announced a couple of days ago.
Closing because this should work in 1.10 and is not expected to work in 1.9.
mikioh
changed the title
go build -buildmode=c-shared -o Not Supported on Windows amd64
cmd/go: go build -buildmode=c-shared -o Not Supported on Windows amd64
Jan 30, 2018
VERSION : 1.9.3
This problem does reproduce with the latest release
.
OS AND HARDWARE : Windows 10 AMD64
I tried building my
sum.go
file usinggo build -buildmode=c-shared -o sum.so sum.go
.Instead of it completing, I got this error
-buildmode=c-shared not supported on windows/amd64
This is the file:
I expected the command to go through and create a
sum.so
and asum.h
fileInstead I got -->
sum.go
file usinggo build -buildmode=c-shared -o sum.so sum.go
.Im doing this so I can import my golang functions into python, is there a way to fix this? Am I using the wrong command, or the wrong file configurations? Thank you.
The text was updated successfully, but these errors were encountered: