英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论