title: Code of Computer Graphics not compiled or installation failed
body: <p>I followed instruction described <a href="http://www.cse.iitm.ac.in/~vplab/courses/CG/opengl_start.html" rel="nofollow noreferrer">http://www.cse.iitm.ac.in/~vplab/courses/CG/opengl_start.html</a> that is as following -  </p>
  
  <p><strong>OpenGL (GLUT) on Linux (Ubuntu) Installation</strong><br>
  Install the following packages from the ubuntu repository:<br>
  1. <code>freeglut3-dev</code><br>
  2. <code>mesa-common-dev</code></p>
  
  <pre><code>sudo apt-get install freeglut3 freeglut3-dev mesa-common-dev
  </code></pre>
  
  <p>Check your /usr/include/GL folder to verify the installation of the openGL headers that you intend to use.
  Compiling and Linking
  You will have to use the <code>-lglut</code> linker option with gcc/g++ to compile a program with <code>glut</code> library.
  For example, to compile the program <a href="http://www.cse.iitm.ac.in/~vplab/courses/CG/openGL/cube.c" rel="nofollow noreferrer">cube.c</a> that uses GLUT type, use</p>
  
  <pre><code>gcc -o cube cube.c -lglut -lGLU
  </code></pre>
  
  <p>to get the binary executable cube.</p>
  
  <p>If you are not using GLUT and want to use the lower level libraries then use -lGL -lGLU also in the linker options.  </p>
  
  <p>But, this doesn't work for me.  </p>
  
  <pre><code>$gcc -o cube cube.c -lglut -lGLU
  /usr/bin/ld: /tmp/cc5OzQPt.o: undefined reference to symbol 'glVertex3fv'
  //usr/lib/x86_64-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>And I didn't get the solution. Help me.</p>
  
  <p>I want to write code in <code>C</code> and my environment is <code>Ubuntu 14.04</code>, <code>Intel processor</code>.</p>