Cross compile shared libraries
问题 I'd like to know if it is possible (and if yes: how) to cross compile shared libraries with Go. Say I have this code: package main import "C" //export DoubleIt func DoubleIt(x int) int { return x * 2 } func main() {} in src/doubler/main.go . On Mac I can run go build -o libdoubler.dylib -buildmode=c-shared doubler to get a shared library called libdoubler.dylib . Similar on linux, just with the extension .so . Now I'd like to use Linux as the main platform to build my libraries (for Mac and