go-gl-legacy / gl

Go bindings for OpenGL
BSD 3-Clause "New" or "Revised" License
342 stars 52 forks source link

Mac OSX Warnings/Errors when running go get #167

Open netpoetica opened 10 years ago

netpoetica commented 10 years ago

Following the instructions for Mac/Linux, I get warnings/errors after running go get on Mac OSX 10.9.4, which seem relatively harmless, but I have been unable to compile some go OpenGL examples without panics. I'm curious if this error is at the root of some of this - thanks for taking a look.

➜  ~GOPATH  go get github.com/go-gl/gl
# github.com/go-gl/gl
In file included from $WORK/github.com/go-gl/gl/_obj/_cgo_export.c:2:
src/github.com/go-gl/gl/debugoutput.go:26:28: warning: incompatible pointer types passing 'void (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *, void *)' to parameter of type 'GLDEBUGPROCARB' (aka 'void (*)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *, const void *)') [-Wincompatible-pointer-types]
# github.com/go-gl/gl
src/github.com/go-gl/gl/debugoutput.go:26:28: warning: incompatible pointer types passing 'void (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *, void *)' to parameter of type 'GLDEBUGPROCARB' (aka 'void (*)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar *, const void *)') [-Wincompatible-pointer-types]

If it helps any, when I run pkg-config I get

➜  github.com  pkg-config glew --libs --cflags
-I/usr/include/GL -lGLEW 

But running with CGO_FLAGS and then go install doesn't appear to actually do anything

pwaller commented 10 years ago

Sorry for the slow response, was on holiday. The warning you've provided above is just a difference in const-ness and shouldn't cause a panic.

Please provide the panic stack trace.