英文:
Running Go in Geany
问题
我正在尝试在Geany中运行Go代码。
不幸的是,当我尝试执行时,出现了以下错误:
./geany_run_script.sh: 5: ./geany_run_script.sh: go: not found
我知道有些帖子说在运行之前必须先编译或构建,但go run
命令可以同时编译和运行,所以...
在Geany中如何运行Go代码?
英文:
I am trying to run go code in geany.
Unfortunately I get this error when I try to execute:
./geany_run_script.sh: 5: ./geany_run_script.sh: go: not found
I know some posts say that one must compile or build before running but the go run
command compiles and runs at the same time, so ...
How does one run go code in geany?
答案1
得分: 1
解决方法是在Geany选项中转到“构建”>“设置构建命令”,在执行命令部分,写入您的go可执行文件的完整路径,例如/path/to/go/bin/go run "%f"
。
英文:
The solution is to go to Build>Set Build Commands in the Geany options, under the Execute commands section, write the full path to your go executable, so /path/to/go/bin/go run "%f"
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论