英文:
How to compile Google Go bin with IntelliJ
问题
我开始学习Go,并在IntelliJ上安装了Go插件。我成功编译和运行了一些非常简单的代码片段。然而,我在bin文件夹中找不到任何二进制文件,而编译器运行以下命令来执行应用程序:
C:/Go/bin/go.exe run E:/IntelliJ/untitled/src/myApp.go
如何获取我编译代码的二进制文件?
英文:
I have started to learn Go and I have installed Go plugin on IntelliJ I have compiled and run sucessful some really simple code pieces. However I don't find any bin file in the bin folder, and the compiler runs this command to execute the app
C:/Go/bin/go.exe run E:/IntelliJ/untitled/src/myApp.go
How to get the binary of my compiled code?
答案1
得分: 1
你需要使用go build
命令,go run
只是在某个地方创建一个临时文件并执行它,然后删除它。
英文:
You need to use go build
, go run
simply creates a temporary file somewhere and executes it then deletes it.
答案2
得分: 0
你只需要在你的运行/调试配置中指定output目录,例如
E:\IntelliJ\untitled\.idea\output
英文:
You simply need to specify output dir in your run/debug configuration like
E:\IntelliJ\untitled\.idea\output
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论