title: Compiling and running OpenGL codes on Netbeans
body: <p>I can run my C++ codes that use OpenGL on Terminal with the following code : </p>
  
  <pre><code>g++ -Wall main.cpp -lglut -lGL -lGLU -lGLEW 
  </code></pre>
  
  <p>I want to use Netbeans while I'm working on OpenGL. When I write the code on Netbeans and run  I get many errors like : </p>
  
  <blockquote>
    <p>/home/../NetBeansProjects/CppApplication_2/main.cpp:36: undefined
    reference to `glutInit'</p>
  </blockquote>
  
  <p>How can I make Netbeans compile and run my code correctly? Do I need to edit the makefile, if yes, how?</p>