发布时间:2023-12-21来源:古典技术网
SET GOOS=linux
设置为linux编译
SET GOOS=windows
设置为windows编译
SET GOARCH=amd64
编译为64位系统
$env:GOARCH = "386"
go build -o main.exe
编译为32位系统
关于GO FYNE的编译问题,默认go build会带CMD框 去掉需要用
go build -ldflags "-s -w -H=windowsgui"
-s 省略符号表和调试信息
-w Omit the DWARF symbol table 省略DWARF符号表
-H windowsgui 不打印信息到console (On Windows, -H windowsgui writes a "GUI binary" instead of a "console binary."),就不会有cmd窗口了
转载请注明出处:古典技术网
本页地址:https://www.gu90.com/pycode/175.html