Golang在windows下交叉编译linux程序
埋头前进的码农 2022-10-29
set CGO_ENABLED=
set GOROOT_BOOTSTRAP=C:/Go
::x86块
set GOARCH=
set GOOS=windows
call make.bat --no-clean set GOOS=linux
call make.bat --no-clean set GOOS=freebsd
call make.bat --no-clean set GOOS=darwin
call make.bat --no-clean
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::x64块
set GOARCH=amd64
set GOOS=linux
call make.bat --no-clean
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::arm块
set GOARCH=arm
set GOOS=linux
call make.bat --no-clean
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: set GOARCH=
set GOOS=windows
go get github.com/nsf/gocode
pause