This question already has an answer here:
I'm attempting to use a library at github.com/hajimehoshi/ebiten. Regardless of what I do, I'm met with this error:
# github.com/go-gl/glfw/v3.2/glfw
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
# github.com/go-gl/gl/v2.1/gl
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
I've attempted updating MinGW
mingw-get udpate
I've set the PATH variable for MinGW.
I've downloaded MinGW-w64 here.
I've gone here and downloaded the tdm-gcc 64 bundle.
And still, I'm met with the same error. How do I circumvent this?
</div>
RTFM cgo
manual, notice there how the go
tool calls the compilers for the foreign languages it supports.
Run
go env
and see at the variables CC
and CXX
it'll show you: that are the C and C++ compilers the go
toolchain would call to compile C and C++ code, respectively.
I bet it will show "bare" names such as gcc
and g++
, respectively.
Notice that when a program on Windows is being run without specifying its full pathname (that is, beginning with a drive letter and followed by that :\
fun construct and then the rest of the path— ending in the actual program file's name), the program's file is looked up in a set of paths defined by the contents of the so-called environment variable called "PATH".
That PATH
env. variable can be system-wide and per-user; the latter trumps the former.
In a shell, run
echo %PATH%
and see whether there are listed any pathnames of the installed C/C++ compilers. I bet there will be a path of some 32-bit GCC but not your 64-bit suite.
Make sure your PATH
env. variable contains an entry for the directory containing the executable program of your 64-bit compiler whose name matches the appropriate name listed in the go env
output.
Please refer to the installation manual of your compiler for more details.
If all else fails, please ask a concrete question about installing that compiler over there at the https://superuser.com.