英文:
How to use cgo in Goclipse with Mingw?
问题
当我尝试使用cgo时,我遇到了错误
exec gcc: exec: "gcc": 在%PATH%中找不到可执行文件
我已经安装了Mingw。我该如何告诉Goclipse gcc的位置?我在首选项或属性中找不到设置的方法。
英文:
When i try to use cgo I get the error
exec gcc: exec: "gcc": executable file not found in %PATH%
I have Mingw installed. How do I tell Goclipse where gcc is? I could not find a way in preferences or properties to set this.
答案1
得分: 2
将MinGW gcc的路径添加到Windows的PATH环境变量中。
英文:
Add the path to MinGW gcc to your Windows PATH environment variable.
答案2
得分: 0
我遇到了同样的问题,只想补充一点,你需要将MinGW的bin目录的路径添加到你的PATH环境变量中。类似于:
C:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev0\mingw64\bin
声望不够,无法以评论的形式提供,所以只能作为答案。
英文:
I had the same problem and just wanted to add that you specifically need to add the path to the bin directory of MinGW to your PATH environment variable. Something like:
C:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev0\mingw64\bin
Not enough reputation to make this a comment, so it's an answer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论