<p dir="auto">by <strong>qeed.quan</strong>:</p>
<pre class="notranslate">For some reason I am getting a build error using cgo with GLEW, I am running linux 64
bit version and 

go version devel +811f060da18a Thu Mar 28 15:04:25 2013 -0700 linux/amd64

with GCC 4.8

I get build errors such as these when trying to install GLEW

# gl
In file included from buffer.go:4:0:
gl.h:4:25: error: enumerator value for '__cgo_enum__8' is not an integer constant
 #define GLEW_GET_FUN(x) (*x)
                         ^
/usr/include/GL/glew.h:1685:22: note: in expansion of macro 'GLEW_GET_FUN'
 #define glGenBuffers GLEW_GET_FUN(__glewGenBuffers)
                      ^
gl.h:4:25: error: enumerator value for '__cgo_enum__9' is not an integer constant
 #define GLEW_GET_FUN(x) (*x)
                         ^
/usr/include/GL/glew.h:1679:22: note: in expansion of macro 'GLEW_GET_FUN'
 #define glBindBuffer GLEW_GET_FUN(__glewBindBuffer)
                      ^
gl.h:4:25: error: enumerator value for '__cgo_enum__10' is not an integer constant
 #define GLEW_GET_FUN(x) (*x)
                         ^
the errors continue from here but they are mostly the same. 

The GLEW header file does 
#define GLEW_GET_FUN(x) (x)
but it needed 
#define GLEW_GET_FUN(x) (*x)
to compile properly when cgo was still working, or else one would get the error:
  could not determine kind of name for C.glDeleteBuffers
and so on.

I have attached my GL bindings to test with glew.</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/5153/0/gl.zip" rel="nofollow">gl.zip</a> (6539 bytes)</li>
</ol>
<p dir="auto">by <strong>vincent.risi</strong>:</p>
<pre class="notranslate">This is not a bug but if the := already allows for some of the variable to 
be old, why not allow for them all to be old?

for instance I would like to have 

  a, b := Called(x)
  ...
  a, b := Called(a*b)

as it does not really affect the usability if this was relaxed.</pre>