简体   繁体   English

在 Windows 中编译 Go 文件?

[英]Compile Go file in Windows?

I am trying to learn Go and have installed Go MinGW but I cannot find out how to actually compile a.go file ANYWHERE.我正在尝试学习 Go 并已安装Go MinGW但我无法找到如何实际编译 a.go 文件的任何地方。 This is the program linked directly from the Go wiki for Windows Support, but all the tutorials talk about using 6g and gccgo etc. to compile and none of those work from my windows machine.这是直接从 Go wiki 链接到 Windows 支持的程序,但所有教程都讨论使用 6g 和 gccgo 等进行编译,而我的 Z0F4137ED1502B5045D6083AA25Z 机器上没有一个工作。

I'm dumb, the file linked is 32 bit and I was using "6g" to compile because my system is 64 bit.我很笨,链接的文件是 32 位的,我使用“6g”编译,因为我的系统是 64 位的。 "8g" works to compile. “8g”可以编译。
"8g myfile.go" “8g myfile.go”
"8l myfile.8" “8l 我的文件.8”
"myfile.out" “我的文件.out”
Works to get it running.使其运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM