Skip to content

goworkeryyt/gocc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocc

go 交叉编译器

使用方法 拉到项目之后进入 执行

go install 

进入 docker/base 目录 执行

docker build -f Dockerfile -t yyt/gocc-base .

然后进入 docker/go-1.16.5 目录执行

docker build -f Dockerfile -t yyt/gocc-1.16.5 .

然后进入 docker/go-latest 目录执行

docker build -f Dockerfile -t yyt/gocc-latest .

能编译的参考平台

--targets=windows/,darwin/ Platforms: android, darwin, ios, linux, windows Achitectures: 386, amd64, arm-5, arm-6, arm-7, arm64, mips, mipsle, mips64, mips64le

编译到 windows 7 386 命令

gocc --targets=windows-7/386 .

编译到 windows 7 amd64 命令

gocc  --targets=windows-7/amd64 .

注意 要想在 windows下运行不出现 dos窗口 需加上参数 -ldflags "-H windowsgui"

编译

gocc -ldflags "-H windowsgui" --targets=windows-7/386 .
gocc -ldflags "-H windowsgui" --targets=windows-7/amd64 .

About

Go CGO cross compiler. Go 语言交叉编译器 copy of https://github.com/karalabe/xgo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published