I wrote a very simple program in Go using using a 2D game library.
package main
import (
\"github.com/hajimehoshi/ebiten\"
\"github.com/hajimehoshi/ebit
So your C compiler does not support 64 bit compilation. One way to resolve this is to build in 32 bit mode. Go will by default try to build for the system architecture that you are on but you can modify that behavior by setting the environment variable GOARCH=386
before building. On Windows you can type this into your cmd:
set GOARCH=386
go build
You could create a simple .bat
batch script with this content and run that when you want to build.
Note that 64 bit systems will run 32 bit programs just fine. This is also a nice way to make sure that when you give the .exe
to someone else, it will run on their system (not considering other dependencies).
If you want to upgrade your C compiler instead to build 64 bit applications, see this SO thread, maybe that helps.