table of Contents
1. Environment
System: win10
IDE:GoLand
Two, report an error
Today, I want to install the sqlite3 driver and report an error after executing the go get command
go get github.com/mattn/go-sqlite3
The error message is as follows:
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
Three, the reason
The error is because the local version of cc1.exe is not 64-bit and cannot be compiled in a 64-bit environment
Four, the solution
Install mingw64-bit compilation environment
https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-snapshot/
After decompression, the path where I stored the mingw64 folder is as follows D:\Program Files\
D:\Program Files\mingw64\bin
Then add this path to the environment variable
Just restart goland, open the terminal and use where gcc to verify that the same environment variable path is correct
Re-execute the goget command to install