title: compiling openGL + GLSL gives undefined reference
body: <p>i am trying to compile this one piece of code from internet and i am failing miserably.
  seems like opengl libs are missing - but they are there - i checked. same goes with glut and glew.</p>
  
  <p>system is Ubuntu 12.04, 
  glxinfo confirms the video adapter is openGL 2.1</p>
  
  <p>here is the Makefile:</p>
  
  <pre><code>all: ljus
  ljus: ljus.c glsl_shader.c calculation.c calculation.h pyramid_func.c
  gcc -std=gnu99 -Wall -o ljus -I. -lz -lglut -lGL -lGLU ljus.c 
  </code></pre>
  
  <p>I was trying to pass different paths to linker but without success. What am I doing wrong?</p>
  
  <p>P.S. here is the 'make' output (rather long - sorry):</p>
  
  <pre><code>/tmp/cc0mDnPf.o: In function `glslCreateProgram':
  ljus.c:(.text+0x4f): undefined reference to `glCreateProgramObjectARB'
  /tmp/cc0mDnPf.o: In function `glslAttachShaderFromMemory':
  ljus.c:(.text+0x118): undefined reference to `glCreateShaderObjectARB'
  ljus.c:(.text+0x13c): undefined reference to `glShaderSourceARB'
  ljus.c:(.text+0x147): undefined reference to `glCompileShaderARB'
  ljus.c:(.text+0x15b): undefined reference to `glAttachObjectARB'
  ljus.c:(.text+0x166): undefined reference to `glDeleteObjectARB'
  /tmp/cc0mDnPf.o: In function `glslBindAttribute':
  ljus.c:(.text+0x3f1): undefined reference to `glBindAttribLocationARB'
  /tmp/cc0mDnPf.o: In function `glslLinkProgram':
  ljus.c:(.text+0x47d): undefined reference to `glLinkProgramARB'
  ljus.c:(.text+0x49f): undefined reference to `glGetObjectParameterivARB'
  ljus.c:(.text+0x4ff): undefined reference to `glGetObjectParameterivARB'
  ljus.c:(.text+0x5f3): undefined reference to `glGetActiveUniformARB'
  ljus.c:(.text+0x739): undefined reference to `glGetUniformLocationARB'
  /tmp/cc0mDnPf.o: In function `glslDeleteProgram':
  ljus.c:(.text+0x795): undefined reference to `glDeleteObjectARB'
  /tmp/cc0mDnPf.o: In function `glslCheckError':
  ljus.c:(.text+0x8a0): undefined reference to `glGetInfoLogARB'
  /tmp/cc0mDnPf.o: In function `glslEnableProgram':
  ljus.c:(.text+0x95a): undefined reference to `glUseProgramObjectARB'
  /tmp/cc0mDnPf.o: In function `glslDisableProgram':
  ljus.c:(.text+0x98b): undefined reference to `glUseProgramObjectARB'
  /tmp/cc0mDnPf.o: In function `glslDisable':
  ljus.c:(.text+0x9a2): undefined reference to `glUseProgramObjectARB'
  /tmp/cc0mDnPf.o: In function `glslGetUniformLocation':
  ljus.c:(.text+0x9bc): undefined reference to `glGetUniformLocation'
  /tmp/cc0mDnPf.o: In function `CheckFramebufferStatus':
  ljus.c:(.text+0xa44): undefined reference to `glCheckFramebufferStatusEXT'
  /tmp/cc0mDnPf.o: In function `gltex_init':
  ljus.c:(.text+0xb0c): undefined reference to `glGenTextures'
  /tmp/cc0mDnPf.o: In function `gltex_init_std2d':
  ljus.c:(.text+0xb58): undefined reference to `glDeleteFramebuffersEXT'
  ljus.c:(.text+0xb6b): undefined reference to `glDeleteTextures'
  ljus.c:(.text+0xb81): undefined reference to `glGenFramebuffersEXT'
  ljus.c:(.text+0xb94): undefined reference to `glGenTextures'
  ljus.c:(.text+0xbaa): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0xbbf): undefined reference to `glBindTexture'
  ljus.c:(.text+0xc10): undefined reference to `glTexImage2D'
  ljus.c:(.text+0xc15): undefined reference to `glGetError'
  ljus.c:(.text+0xc29): undefined reference to `gluErrorString'
  ljus.c:(.text+0xc7e): undefined reference to `glTexParameterf'
  ljus.c:(.text+0xc9b): undefined reference to `glTexParameterf'
  ljus.c:(.text+0xcb8): undefined reference to `glTexParameterf'
  ljus.c:(.text+0xcd5): undefined reference to `glTexParameterf'
  ljus.c:(.text+0xcda): undefined reference to `glGetError'
  ljus.c:(.text+0xcee): undefined reference to `gluErrorString'
  ljus.c:(.text+0xd53): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0xd58): undefined reference to `glGetError'
  ljus.c:(.text+0xd6c): undefined reference to `gluErrorString'
  ljus.c:(.text+0xdbd): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0xdc2): undefined reference to `glGetError'
  ljus.c:(.text+0xdd6): undefined reference to `gluErrorString'
  /tmp/cc0mDnPf.o: In function `gltex_destroy':
  ljus.c:(.text+0xe29): undefined reference to `glDeleteTextures'
  /tmp/cc0mDnPf.o: In function `calc_init_opengl':
  ljus.c:(.text+0xe5d): undefined reference to `glGenQueries'
  ljus.c:(.text+0xe69): undefined reference to `glGenLists'
  ljus.c:(.text+0xe83): undefined reference to `glNewList'
  ljus.c:(.text+0xe8f): undefined reference to `glBegin'
  ljus.c:(.text+0xea5): undefined reference to `glVertex2f'
  ljus.c:(.text+0xebb): undefined reference to `glVertex2f'
  ljus.c:(.text+0xed1): undefined reference to `glVertex2f'
  ljus.c:(.text+0xee7): undefined reference to `glVertex2f'
  ljus.c:(.text+0xeec): undefined reference to `glEnd'
  ljus.c:(.text+0xef1): undefined reference to `glEndList'
  ljus.c:(.text+0xef6): undefined reference to `glGetError'
  ljus.c:(.text+0xf0a): undefined reference to `gluErrorString'
  /tmp/cc0mDnPf.o: In function `calc_light_makecartesian':
  ljus.c:(.text+0xf71): undefined reference to `sin'
  ljus.c:(.text+0xf97): undefined reference to `cos'
  ljus.c:(.text+0xfcd): undefined reference to `sin'
  ljus.c:(.text+0x1003): undefined reference to `cos'
  ljus.c:(.text+0x1029): undefined reference to `cos'
  /tmp/cc0mDnPf.o: In function `calc_light_turn':
  ljus.c:(.text+0x109f): undefined reference to `fmod'
  /tmp/cc0mDnPf.o: In function `calc_tubelist_setup':
  ljus.c:(.text+0x1138): undefined reference to `glGetError'
  ljus.c:(.text+0x114c): undefined reference to `gluErrorString'
  ljus.c:(.text+0x11cc): undefined reference to `glDisable'
  ljus.c:(.text+0x11e1): undefined reference to `glGenTextures'
  ljus.c:(.text+0x1207): undefined reference to `glBindTexture'
  ljus.c:(.text+0x1257): undefined reference to `glTexImage2D'
  ljus.c:(.text+0x1273): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x128f): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x1294): undefined reference to `glGetError'
  ljus.c:(.text+0x12a8): undefined reference to `gluErrorString'
  ljus.c:(.text+0x1306): undefined reference to `glGenFramebuffersEXT'
  ljus.c:(.text+0x131c): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x134a): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x1378): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x13a6): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x13d4): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x13f8): undefined reference to `glFramebufferRenderbufferEXT'
  ljus.c:(.text+0x1411): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x1426): undefined reference to `glGenTextures'
  ljus.c:(.text+0x144f): undefined reference to `glBindTexture'
  ljus.c:(.text+0x149f): undefined reference to `glTexImage2D'
  ljus.c:(.text+0x14bb): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x14d7): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x14dc): undefined reference to `glGetError'
  ljus.c:(.text+0x14f0): undefined reference to `gluErrorString'
  ljus.c:(.text+0x154e): undefined reference to `glGenFramebuffersEXT'
  ljus.c:(.text+0x1564): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x1592): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x15c0): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x15ee): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x161c): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x1640): undefined reference to `glFramebufferRenderbufferEXT'
  ljus.c:(.text+0x1659): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x1666): undefined reference to `glGetError'
  ljus.c:(.text+0x167a): undefined reference to `gluErrorString'
  /tmp/cc0mDnPf.o: In function `glhistotex_init_full':
  ljus.c:(.text+0x1fbe): undefined reference to `glGenTextures'
  ljus.c:(.text+0x2018): undefined reference to `glGetError'
  ljus.c:(.text+0x202c): undefined reference to `gluErrorString'
  ljus.c:(.text+0x2079): undefined reference to `glBindTexture'
  ljus.c:(.text+0x20cb): undefined reference to `glTexImage2D'
  ljus.c:(.text+0x20e7): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2103): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2120): undefined reference to `glTexParameterf'
  ljus.c:(.text+0x213d): undefined reference to `glTexParameterf'
  ljus.c:(.text+0x2153): undefined reference to `glGenFramebuffersEXT'
  ljus.c:(.text+0x2169): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x2196): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x21ba): undefined reference to `glFramebufferRenderbufferEXT'
  ljus.c:(.text+0x21ce): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x21d3): undefined reference to `glGetError'
  ljus.c:(.text+0x21e7): undefined reference to `gluErrorString'
  /tmp/cc0mDnPf.o: In function `gen_histo_tex':
  ljus.c:(.text+0x23ba): undefined reference to `glDisable'
  ljus.c:(.text+0x2532): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x255a): undefined reference to `glClearColor'
  ljus.c:(.text+0x2566): undefined reference to `glClear'
  ljus.c:(.text+0x25c2): undefined reference to `glViewport'
  ljus.c:(.text+0x25d7): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x25fc): undefined reference to `glUniform1i'
  ljus.c:(.text+0x2656): undefined reference to `glUniform2f'
  ljus.c:(.text+0x26b0): undefined reference to `glUniform2f'
  ljus.c:(.text+0x270a): undefined reference to `glUniform2f'
  ljus.c:(.text+0x271d): undefined reference to `glBindTexture'
  ljus.c:(.text+0x274f): undefined reference to `glBegin'
  ljus.c:(.text+0x2765): undefined reference to `glTexCoord2f'
  ljus.c:(.text+0x277b): undefined reference to `glVertex2f'
  ljus.c:(.text+0x2791): undefined reference to `glTexCoord2f'
  ljus.c:(.text+0x27a5): undefined reference to `glVertex2f'
  ljus.c:(.text+0x27bb): undefined reference to `glTexCoord2f'
  ljus.c:(.text+0x27cd): undefined reference to `glVertex2f'
  ljus.c:(.text+0x27e3): undefined reference to `glTexCoord2f'
  ljus.c:(.text+0x27f7): undefined reference to `glVertex2f'
  ljus.c:(.text+0x27fc): undefined reference to `glEnd'
  ljus.c:(.text+0x2801): undefined reference to `glFinish'
  ljus.c:(.text+0x2816): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x28a6): undefined reference to `glViewport'
  ljus.c:(.text+0x28bb): undefined reference to `glBindTexture'
  ljus.c:(.text+0x28e0): undefined reference to `glUniform1i'
  ljus.c:(.text+0x293a): undefined reference to `glUniform2f'
  ljus.c:(.text+0x2994): undefined reference to `glUniform2f'
  ljus.c:(.text+0x29f4): undefined reference to `glUniform2f'
  ljus.c:(.text+0x2a01): undefined reference to `glCallList'
  ljus.c:(.text+0x2a06): undefined reference to `glFinish'
  ljus.c:(.text+0x2a2f): undefined reference to `glBindFramebufferEXT'
  /tmp/cc0mDnPf.o: In function `gen_tubelist':
  ljus.c:(.text+0x2a4d): undefined reference to `glDisable'
  ljus.c:(.text+0x2a89): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x2ac4): undefined reference to `glReadPixels'
  ljus.c:(.text+0x2b2f): undefined reference to `sqrt'
  ljus.c:(.text+0x2bcb): undefined reference to `glGenTextures'
  ljus.c:(.text+0x2be5): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2c35): undefined reference to `glTexImage2D'
  ljus.c:(.text+0x2c51): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2c6d): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2c8b): undefined reference to `glGenTextures'
  ljus.c:(.text+0x2ca8): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2cf8): undefined reference to `glTexImage2D'
  ljus.c:(.text+0x2d14): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2d30): undefined reference to `glTexParameteri'
  ljus.c:(.text+0x2d54): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x2d82): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2db0): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2dde): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2e0c): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2e30): undefined reference to `glFramebufferRenderbufferEXT'
  ljus.c:(.text+0x2e46): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x2e74): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2ea2): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2ed0): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2efe): undefined reference to `glFramebufferTexture2DEXT'
  ljus.c:(.text+0x2f22): undefined reference to `glFramebufferRenderbufferEXT'
  ljus.c:(.text+0x2f35): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2f41): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2f54): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2f60): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2f73): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2f7f): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2f92): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2f9e): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2fb1): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2fbd): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2fd0): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2fdc): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x2fef): undefined reference to `glBindTexture'
  ljus.c:(.text+0x2ffb): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x300e): undefined reference to `glBindTexture'
  ljus.c:(.text+0x301a): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x302f): undefined reference to `glBindTexture'
  ljus.c:(.text+0x303b): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x3063): undefined reference to `glViewport'
  ljus.c:(.text+0x308b): undefined reference to `glClearColor'
  ljus.c:(.text+0x30a1): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x30ad): undefined reference to `glDisable'
  ljus.c:(.text+0x30b9): undefined reference to `glClear'
  ljus.c:(.text+0x30e6): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x30f9): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3109): undefined reference to `glUniform1i'
  ljus.c:(.text+0x311c): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x312c): undefined reference to `glUniform1i'
  ljus.c:(.text+0x313f): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x314f): undefined reference to `glUniform1i'
  ljus.c:(.text+0x3162): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3172): undefined reference to `glUniform1i'
  ljus.c:(.text+0x3195): undefined reference to `glUniform1i'
  ljus.c:(.text+0x31ce): undefined reference to `glUniform1f'
  ljus.c:(.text+0x3245): undefined reference to `glUniform2f'
  ljus.c:(.text+0x3298): undefined reference to `glUniform2f'
  ljus.c:(.text+0x32d6): undefined reference to `glUniform1f'
  ljus.c:(.text+0x3317): undefined reference to `glUniform2f'
  ljus.c:(.text+0x333b): undefined reference to `glUniform1f'
  ljus.c:(.text+0x334e): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x335b): undefined reference to `glCallList'
  ljus.c:(.text+0x3371): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x337d): undefined reference to `glClear'
  ljus.c:(.text+0x338e): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x33a1): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x33b1): undefined reference to `glUniform1i'
  ljus.c:(.text+0x33c4): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x33d4): undefined reference to `glUniform1i'
  ljus.c:(.text+0x33e7): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x33f7): undefined reference to `glUniform1i'
  ljus.c:(.text+0x340a): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x341a): undefined reference to `glUniform1i'
  ljus.c:(.text+0x343d): undefined reference to `glUniform1i'
  ljus.c:(.text+0x347c): undefined reference to `glUniform1f'
  ljus.c:(.text+0x34f9): undefined reference to `glUniform2f'
  ljus.c:(.text+0x354c): undefined reference to `glUniform2f'
  ljus.c:(.text+0x358a): undefined reference to `glUniform1f'
  ljus.c:(.text+0x35cb): undefined reference to `glUniform2f'
  ljus.c:(.text+0x35ef): undefined reference to `glUniform1f'
  ljus.c:(.text+0x3602): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x360f): undefined reference to `glCallList'
  ljus.c:(.text+0x3623): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x362f): undefined reference to `glDrawBuffer'
  ljus.c:(.text+0x3642): undefined reference to `glDeleteTextures'
  ljus.c:(.text+0x3655): undefined reference to `glDeleteTextures'
  /tmp/cc0mDnPf.o: In function `check_timer':
  ljus.c:(.text+0x367e): undefined reference to `glGetQueryObjectiv'
  ljus.c:(.text+0x369f): undefined reference to `glGetQueryObjectiv'
  /tmp/cc0mDnPf.o: In function `calc_pass':
  ljus.c:(.text+0x36df): undefined reference to `glGetError'
  ljus.c:(.text+0x36f3): undefined reference to `gluErrorString'
  ljus.c:(.text+0x3773): undefined reference to `sin'
  ljus.c:(.text+0x379c): undefined reference to `cos'
  ljus.c:(.text+0x37d8): undefined reference to `sin'
  ljus.c:(.text+0x3814): undefined reference to `cos'
  ljus.c:(.text+0x3840): undefined reference to `cos'
  ljus.c:(.text+0x3874): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3880): undefined reference to `glPushAttrib'
  ljus.c:(.text+0x38a7): undefined reference to `glViewport'
  ljus.c:(.text+0x38bc): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x38f1): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x390d): undefined reference to `glUniform2f'
  ljus.c:(.text+0x3953): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3979): undefined reference to `glUniform3f'
  ljus.c:(.text+0x399e): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x39b2): undefined reference to `glUniform3f'
  ljus.c:(.text+0x39d7): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x39eb): undefined reference to `glUniform3f'
  ljus.c:(.text+0x39fe): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x3a0b): undefined reference to `glCallList'
  ljus.c:(.text+0x3a10): undefined reference to `glFinish'
  ljus.c:(.text+0x3a25): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3a3a): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x3a6f): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3a8b): undefined reference to `glUniform2f'
  ljus.c:(.text+0x3ab0): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3ac4): undefined reference to `glUniform3f'
  ljus.c:(.text+0x3ad7): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x3ae4): undefined reference to `glCallList'
  ljus.c:(.text+0x3ae9): undefined reference to `glFinish'
  ljus.c:(.text+0x3afa): undefined reference to `glPopAttrib'
  ljus.c:(.text+0x3b0e): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3b1a): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x3b26): undefined reference to `glDrawBuffer'
  ljus.c:(.text+0x3b52): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3b5e): undefined reference to `glPushAttrib'
  ljus.c:(.text+0x3b85): undefined reference to `glViewport'
  ljus.c:(.text+0x3b9a): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x3bcf): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3beb): undefined reference to `glUniform2f'
  ljus.c:(.text+0x3c31): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3c57): undefined reference to `glUniform3f'
  ljus.c:(.text+0x3c7c): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3c90): undefined reference to `glUniform3f'
  ljus.c:(.text+0x3cb5): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3cc9): undefined reference to `glUniform3f'
  ljus.c:(.text+0x3ced): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3cff): undefined reference to `glUniform1f'
  ljus.c:(.text+0x3d12): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x3d1f): undefined reference to `glCallList'
  ljus.c:(.text+0x3d24): undefined reference to `glFinish'
  ljus.c:(.text+0x3d39): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3d4e): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x3d83): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3d9f): undefined reference to `glUniform2f'
  ljus.c:(.text+0x3dc4): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3dd8): undefined reference to `glUniform3f'
  ljus.c:(.text+0x3dfc): undefined reference to `glGetUniformLocation'
  ljus.c:(.text+0x3e0e): undefined reference to `glUniform1f'
  ljus.c:(.text+0x3e21): undefined reference to `glDrawBuffers'
  ljus.c:(.text+0x3e2e): undefined reference to `glCallList'
  ljus.c:(.text+0x3e33): undefined reference to `glFinish'
  ljus.c:(.text+0x3e44): undefined reference to `glPopAttrib'
  ljus.c:(.text+0x3e58): undefined reference to `glBindFramebufferEXT'
  ljus.c:(.text+0x3e64): undefined reference to `glUseProgramObjectARB'
  ljus.c:(.text+0x3e70): undefined reference to `glDrawBuffer'
  ljus.c:(.text+0x3e7f): undefined reference to `glGetError'
  ljus.c:(.text+0x3e93): undefined reference to `gluErrorString'
  ljus.c:(.text+0x3eed): undefined reference to `glBeginQuery'
  ljus.c:(.text+0x3ef9): undefined reference to `glPushAttrib'
  ljus.c:(.text+0x3f20): undefined reference to `glViewport'
  ljus.c:(.text+0x3f2c): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x3f41): undefined reference to `glBindTexture'
  ljus.c:(.text+0x3f4d): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x3f62): undefined reference to `glBindTexture'
  ljus.c:(.text+0x3f6e): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x3f83): undefined reference to `glBindTexture'
  ljus.c:(.text+0x3f8f): undefined reference to `glActiveTexture'
  ljus.c:(.text+0x3fa4): undefined reference to `glBindTexture'
  ljus.c:(.text+0x3fb0): undefined reference to `glActiveTexture'
  
  ... i had to trim it to fit in 30000 chars
  </code></pre>