Skip to content

Instantly share code, notes, and snippets.

@ilude
Last active December 20, 2015 03:49
Show Gist options
  • Select an option

  • Save ilude/6066161 to your computer and use it in GitHub Desktop.

Select an option

Save ilude/6066161 to your computer and use it in GitHub Desktop.
Go Environment Script

download and compile GLEW in msys shell of DevKit

gcc -DGLEW_NO_GLU -O2 -Wall -W -Iinclude -DGLEW_BUILD -o src/glew.o -c src/glew.c

gcc -shared -Wl,-soname,libglew32.dll -Wl,--out-implib,lib/libglew32.dll.a -o lib/glew32.dll src/glew.o -L/mingw/lib -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32

# Create glew32.dll
ar cr lib/libglew32.a src/glew.o

Copy bin/, lib/ and include to mingw\x86_64-w64-mingw32 directory of devkit

$env:GOROOT="C:\Ruby\go1.1.1.windows-amd64\go"
$env:GOOS="windows"
$env:GOARCH="amd64"
#$env:GOARCH="386"
$env:Path = "$env:GOROOT\bin;C:\MinGW64\bin;$env:Path"
$env:GOPATH="C:\Ruby\go1.1.1.windows-amd64\lib"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment