在Windows上编译Go文件?

huangapple go评论101阅读模式
英文:

Compile Go file in Windows?

问题

我正在尝试学习Go,并已安装了Go MinGW,但我无法找到如何实际编译.go文件的方法。这个程序直接从Go维基链接到Windows支持,但所有的教程都谈到使用6g和gccgo等编译器,而这些在我的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. 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.

答案1

得分: 3

我很笨,链接的文件是32位的,而我使用"6g"进行编译,因为我的系统是64位的。使用"8g"可以进行编译。
"8g myfile.go"
"8l myfile.8"
"myfile.out"
可以使其运行。

英文:

I'm dumb, the file linked is 32 bit and I was using "6g" to compile because my system is 64 bit. "8g" works to compile.
"8g myfile.go"
"8l myfile.8"
"myfile.out"
Works to get it running.

huangapple
  • 本文由 发表于 2011年5月25日 10:30:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/6118919.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定