title: FreeGLUT linking Issues in Linux
body: <p>I am running <strong>Linux Mint 14.1 64-bit</strong></p>
  
  <p>I have installed the following libs:</p>
  
  <p><strong>mesa-common-dev,
  freeglut3-dev,
  libglew-dev</strong></p>
  
  <p>through the <strong>apt-get</strong> tool.</p>
  
  <p>Here are my includes, located in my <strong>Main.h</strong> file:</p>
  
  <pre><code>#include &lt;cmath&gt;
  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/glut.h&gt;
  #include &lt;time.h&gt; 
  </code></pre>
  
  <p>I checked that the libs installed correctly, they seem to be located in <strong>/usr/lib/x86_64-linux-gnu</strong>
  and the headers in <strong>/usr/include/GL</strong></p>
  
  <p>I proceed to compile my <strong>Main.C</strong> file with the following flags:</p>
  
  <pre><code>g++ -Wall -Wextra -Weffc++ -Winit-self -Wmissing-include-dirs -Wswitch-default -switch-enum -Wunused-parameter -Wstrict-overflow=5 -Wfloat-equal -Wshadow -Wc++0x-compat -Wconversion -Wsign-conversion -Wmissing-declarations -Wstrict-null-sentinel -Woverloaded-virtual -Wsign-promo -Werror -pedantic -Wcast-qual -fno-pretty-templates -fmessage-length=80 -fdiagnostics-show-option -g -std=c++0x -pipe -frepo -c  Main.C -o Main.o
  </code></pre>
  
  <p><strong>Main.o</strong> is generated without any issues, then I try to create the binary:</p>
  
  <pre><code>g++  -I/usr/include -L/usr/lib/x86_64-linux-gnu -lGL -lglut -lGLU -lGLEW -lX11 -lm -lrt -lpng Main.o -o main
  </code></pre>
  
  <p>And receive the following errors:</p>
  
  <pre><code>Main.o: In function `init()':
  /path/to/Main.C:12: undefined reference to `glClearColor'
  Main.o: In function `initGLUT(int, char**)':
  /path/to/Main.C: undefined reference to `glutInit'
  /path/to/Main.C:21: undefined reference to `glutInitDisplayMode'
  /path/to/Main.C:24: undefined reference to `glutInitWindowSize'
  /path/to/Main.C:25: undefined reference to `glutCreateWindow'
  /path/to/Main.C:28: undefined reference to `glutDisplayFunc'
  /path/to/Main.C:31: undefined reference to `glutKeyboardFunc'
  /path/to/Main.C:34: undefined reference to `glutMouseFunc'
  /path/to/Main.C:37: undefined reference to `glutReshapeFunc'
  /path/to/Main.C:40: undefined reference to `glutIdleFunc'
  Main.o: In function `printFPS()':
  /path/to/Main.C:96: undefined reference to `glutGet'
  Main.o: In function `reshape(int, int)':
  /path/to/Main.C:123: undefined reference to `glutPostRedisplay'
  Main.o: In function `getTime()':
  /path/to/Main.C:129: undefined reference to `glutGet'
  Main.o: In function `idle()':
  /path/to/Main.C:141: undefined reference to `glutPostRedisplay'
  Main.o: In function `display()':
  /path/to/Main.C:148: undefined reference to `glClearColor'
  /path/to/Main.C:149: undefined reference to `glClear'
  /path/to/Main.C:150: undefined reference to `glFlush'
  /path/to/Main.C:151: undefined reference to `glutSwapBuffers'
  Main.o: In function `main':
  /path/to/Main.C:164: undefined reference to `glutMainLoop'
  </code></pre>
  
  <p>The program compiles and links on another Linux system though.
  what could I be missing?</p>