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% - 捕风阁](https://res.eemu.cn/LightPicture/2022/08/1a634e5882bad5ef.png)
解压后将bin文件夹添加至系统变量path
![图片[2] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁](https://res.eemu.cn/LightPicture/2022/08/f9b23c38d170db0d.png)
![图片[3] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁](https://res.eemu.cn/LightPicture/2022/08/16740c313ab74ff2.png)
查看是否安装成功
gcc -v
![图片[4] - gcc: exec: “gcc”: executable file not found in %PATH% - 捕风阁](https://res.eemu.cn/LightPicture/2022/08/27a5c72baf01692c.png)
方法2:下载TDM-GCC
也可以下载TDM-GCC
https://jmeubank.github.io/tdm-gcc/
安装好之后,将TDM-gcc的Bin路径写入系统Path变量
© 版权声明
站内部分资源由网友投稿或收集于网络,若侵犯了您的合法权益,请联系我们删除
THE END









暂无评论内容