I assume that you are trying to compile GLSL code using a regular C compiler.
It seems like it should be C-code, but in fact it is the source of GLSL that was compiled by the OpenGL GLSL compiler, and not the C compiler.
The fragment shader has a predefined variable 'gl_Color', which is the result of the vertex shader.
The sample you reference has code inside the shader.frag file referenced by shader.init (). The OpenGL library itself will handle the compilation in the GPU instructions for your computer. Put the code in this file and hopefully the example will work :)
source share