目录
一、环境
系统:win10
IDE:GoLand
二、报错
今天想安装sqlite3的驱动,执行了go get命令之后报错
go get github.com/mattn/go-sqlite3
报错信息如下:
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
三、原因
报错是因为本地的cc1.exe版本不是64位的,在64位环境下无法编译
四、解决方案
安装mingw64位的编译环境
https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-snapshot/
解压后,mingw64文件夹我存放的路径如下D:\Program Files\
D:\Program Files\mingw64\bin
然后把这个路径添加进环境变量里面
重启goland就可以了,打开终端,用where gcc验证一样环境变量路径是否正确
重新执行goget命令安装即可