when i use the command
go get github.com/mattn/go-sqlite3
i get error
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
i have gcc in my system ( see screenshot below)
my go env output
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\dark knight\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\DARKKN~1\AppData\Local\Temp\go-build281473903=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
check which gcc. If the gcc is located in msys2 or cygwin. You should use native C compiler instead.
FYI, which gcc is a Linux command. On Windows, the command would be where gcc.
$ which gcc
/c/MinGW/bin/gcc
I believe MinGW only supports 32-bit. You'll need to install and use MinGW-w64. Alternatively, try CGO_ENABLED=1 GOARCH=386 to make it build a 32-bit executable instead.
please install TDM64-GCC (it's a MinGW-w64) compiler suite, easy to use
https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC Installer/tdm64-gcc-5.1.0-2.exe/download
1)enter to console export CC=x86_64-pc-cygwin-gcc
2) try again
It`s help me
What OS you are doing this on? What you seen? log file? go env ?
@hackertron Is this is current ? Please remove CYGWIN and use TDM suggested by @firasmdar
Issue closed; please re-open if required.
Sorry, but why you does not use classic Windows compiler bases with Visual Studio or distribute with Express package?
Go does not support msvc object files.
Most helpful comment
please install TDM64-GCC (it's a MinGW-w64) compiler suite, easy to use
https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC Installer/tdm64-gcc-5.1.0-2.exe/download