I'm trying to execute go build -buildmode=shared -linkshared test
but I'm getting the error:
go 1.10: cannot implicitly include runtime/cgo in a shared library
I have only one file in that package
lib.go
package test
import "fmt"
func Hello() {
fmt.Println("Hi")
}
I'm on a linux machine running go1.10.4 linux/amd64
go build -buildmode=shared
. I'm using go 1.13. – Novice