I run the below code at Win 10
and got both lib
and lib.h
generated, tried the same at Mac
but only lib
got generated, and the lib.h
not appeared!!
// file: lib/go.mod
module hasan/lib
go 1.14
And
// file: lib/main.go
package main
import "fmt"
//export HelloWorld
func HelloWorld() {
fmt.Printf("hello world")
}
func main() {}
And made the build as:
$ go build -buildmode=c-shared
No error show up