#Golang supports cross-compilation, which means that if you develop on a 32-bit platform machine, you can compile and generate an executable program on a 64-bit platform.
# Cross -compilation Dependence The following environment variables: (Recommended Learning: Go )
## $ Goarch target platform (compiled after compilation The processor architecture (386, amd64, arm) of the target platform)$GOOS The operating system (darwin, freebsd, linux, windows) of the target platform (compiled target platform)
Each Platform GOOS and GOARCH reference
OS ARCH OS version linux 386 / amd64 / arm >= Linux 2.6 darwin 386 / amd64 OS X (Snow Leopard + Lion) freebsd 386 / amd64 >= FreeBSD 7 windows 386 / amd64 >= Windows 2000
The above is the detailed content of Can golang be cross-platform?. For more information, please follow other related articles on the PHP Chinese website!