包含了cgo
exec: "gcc": executable file not found in %PATH%
原因分析
通过提示可知;cc1.exe版本不是64位的,在64位环境下无法编译
解决办法
需要将mingw32换成mingw64.
下载安装包
下载地址: https://sourceforge.net/projects/mingw-w64/
安装:选择64位版本安装
默认安装在C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
添加环境变量:
GCC_HOME
E:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
验证
C:\Users\Administrator>gcc -v
参考:
1.https://blog.csdn.net/jacke121/article/details/88388837
标签:windows,w64,mingw64,mingw,64,go,seh From: https://www.cnblogs.com/rebrobot/p/17464076.html