0

I'm trying to get go-gl to work on windows. I've downloaded mingw and I've installed glfw according to this question (I put the dll in System32).

I download triangle.go from the examples github and setup this folder structure on my desktop:

/gocode
  /src
    /gogltest
      triangle.go

I set the gocode folder as the gopath, I cd into gogltest and run go get. It downloads the files into gocode/src/github.com/ and I get this output:

# github.com/go-gl/glfw3
..\github.com\go-gl\glfw3\clipboard.go:4:24: fatal error: GLFW/glfw3.h: No such
file or directory
 //#include <GLFW/glfw3.h>
                        ^
compilation terminated.
# github.com/go-gl/gl
In file included from ..\github.com\go-gl\gl\attriblocation.go:7:0:
gl.h:2:21: fatal error: GL/glew.h: No such file or directory
 #include <GL/glew.h>
                     ^
compilation terminated.

What am I missing that will make glfw work for me?

Community
  • 1
  • 1
Corey Ogburn
  • 24,072
  • 31
  • 113
  • 188
  • You need to be able to build `github.com/go-gl/gl` first. Have you read through the README? There's [no confirmation of it working on windows](https://github.com/go-gl/gl#windows), but that's where you need to start. – JimB Jan 06 '15 at 18:45
  • I have read through that and the support is currently unknown. But I can't build go-gl/gl because mingw just can't find GLFW or GL despite the two files above being listed in `C:\MinGW\include\GLFW\glfw3.h` and `C:\MinGW\include\GL\glew.h`. Does `include` need to be in the path? – Corey Ogburn Jan 06 '15 at 18:58
  • Just a heads up as well, if you get past this issue, there are a few bad import statements: "github.com/go-gl/mathgl/examples/opengl-tutorial/helper" "github.com/go-gl/mathgl/examples/opengl-tutorial/input" I believe should be "github.com/go-gl/examples/mathgl/opengl-tutorial/helper" "github.com/go-gl/examples/mathgl/opengl-tutorial/input" – kwolfe Jan 06 '15 at 19:00
  • @CoreyOgburn: that error is not related to GLFW at all, but to [GLEW](http://glew.sourceforge.net/), which is an entirely different library. – derhass Jan 06 '15 at 19:11
  • @derhass I've gone down that road as well, but it doesn't do me any good to mess with GLEW if mingw's g++ can't find glfw3.h as well. I feel like fixing one missing file will direct me towards how to fix the second missing file. – Corey Ogburn Jan 06 '15 at 19:13
  • @kwolfe -- Those are mine, can you send a pull request fixing the bad imports? – Linear Jan 06 '15 at 20:08

0 Answers0