duanjia2415
2012-07-07 02:21 浏览 33
已采纳

如何在Mingc中的Goclipse中使用cgo?

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.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答 默认 最新

  • 已采纳
    douguachan2879 douguachan2879 2012-07-07 04:20

    Add the path to MinGW gcc to your Windows PATH environment variable.

    Setting environment variables under Windows

    点赞 评论 复制链接分享
  • dongsisui7562 dongsisui7562 2017-05-08 09:34

    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.

    点赞 评论 复制链接分享

相关推荐