title: C++ undefined reference to `_imp__glewInit@0`
body: <p>Note: I have seen the post about the person having this problem in the C language because the glew.c script was not loading for him, I don't think that is my problem.  From following the exact steps on the GLEW documentation website as closely as possible (and in which I saw no mention of a requirement to add a file called glew.c) I've setup glew with MinGW and extracted the dll's and libs to the appropriate folders yet at compile time I get this message:</p>
  
  <pre><code>undefined reference to `_imp__glewInit@0`
  </code></pre>
  
  <p>Here is my main file main.cpp:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/glut.h&gt;
  
  using namespace std;
  
   int main(int argc, char *argv[])
  {
      glutInit(&amp;argc, argv);
      glutCreateWindow("Glew Test");
      GLenum err = glewInit();
  
      if (GLEW_OK != err)
      {
          cout &lt;&lt; "Something effed up";
      }
  
      cout &lt;&lt; "Awwwwwwwwhhhhh Yeeeeeeeaaaaah!!!";
  
  return 0;
  }
  </code></pre>
  
  <p>And here is my MakeFile:</p>
  
  <pre><code>MY_LIBS = -lglut32 -lglew32 -lopengl32 
  glewex:
      g++ -g main.cpp -o glewex $(MY_LIBS)
  </code></pre>
  
  <p>Any ideas as to why I get this error?</p>