gcc: exec: “gcc”: executable file not found in %PATH%

golang Win编译fyne例程报错

gcc: exec: "gcc": executable file not found in %PATH%

这是因为Windows系统上没有GCC编译器。而编译代码中的包里面可能需要用到gcc编译器。

方法1:下载mingw

https://sourceforge.net/projects/mingw-w64/files/mingw-w64/

不要下载exe文件,网不好安装下载资源包很费劲。还是下载64位x86_64-posix-seh压缩包,直接解压就行。

 

图片[1] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁

 

解压后将bin文件夹添加至系统变量path

图片[2] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁

图片[3] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁

 

查看是否安装成功

gcc  -v

图片[4] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁

 

方法2:下载TDM-GCC

也可以下载TDM-GCC

https://jmeubank.github.io/tdm-gcc/

安装好之后,将TDM-gcc的Bin路径写入系统Path变量

 

 

 

 

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容