title: Linking error in VS2010 with GLew/ GLee/ Unofficial OpenGL SDK
body: <p>I am running Visual Studio 2010 Professional on a Windows 7 64bit laptop (HP Pavilion g6)</p>
  
  <p>Unofficial OpenGL SDK: <a href="http://glsdk.sourceforge.net/docs/html/index.html" rel="nofollow">http://glsdk.sourceforge.net/docs/html/index.html</a></p>
  
  <p>Unofficial OpenGL SDK, GLew, &amp; GLee are all up to date, with matching drivers, libs and headers where appropriate</p>
  
  <p>Settings:</p>
  
  <pre><code>Preprocessor either over the entire project OR over the main.c file: GLEW_STATIC
  
  Additional Include Directories:
  C:/glsdk_0.4.2/glload/include;C:/glsdk_0.4.2/glimg/include;C:/glsdk_0.4.2/glutil/include;C:/glsdk_0.4.2/glmesh/include;C:/glsdk_0.4.2/glm;C:/glsdk_0.4.2/glfw/include;C:/glsdk_0.4.2/freeglut/include;
  
  Additional Library Directories:
  C:/glsdk_0.4.2/glload/lib;C:/glsdk_0.4.2/glimg/lib;C:/glsdk_0.4.2/glutil/lib;C:/glsdk_0.4.2/glmesh/lib;C:/glsdk_0.4.2/glfw/library;C:/glsdk_0.4.2/freeglut/lib;
  
  Also tried adding C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib/glew32s.lib (or glew32, glew32mx &amp; glew32mxs);C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib/OpenGL32.lib; in Linker -&gt; Input -&gt; Additional Dependancies
  
  Path Inputs (Changed through Environment Variables. Excluding irrelevant entries):
  C:\glsdk_0.4.2\glutil\lib;C:\glsdk_0.4.2\freeglut\lib;C:\glsdk_0.4.2\glfw\library;C:\glsdk_0.4.2\glload\lib;C:\glsdk_0.4.2\glimg\lib;
  
  GLew &amp; GLee lib files are located in:
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
  Also tried with them located at:
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
  
  GLew &amp; GLee header files are located in:
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL
  Also tried with them located at:
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\GL
  </code></pre>
  
  <p>Code (other than headers) copied from "OpenGL Distilled", ISBN10 - 0-321-33679-8:</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
      #include &lt;math.h&gt;
  
      // Uncomment for GLee ( Also comment out glutInit(&amp;argc, argv); )
      //#include &lt;GL\GLee.h&gt;
  
      // Uncomment for GLew
      /*#include &lt;GL\glew.h&gt;
      #include &lt;GL\wglew.h&gt;
      #include &lt;GL\glut.h&gt;
      #include &lt;GL\glext.h&gt; */
  
      // Uncomment for all headers in the "Unofficial OpenGL SDK"
      /*#include &lt;glload\gl_all.h&gt;
      #include &lt;GL\glut.h&gt;
      #include &lt;glload\gll.h&gt;
      #include &lt;glimg\glimg.h&gt;
      #include &lt;glutil\glutil.h&gt;
      #include &lt;glmesh\glmesh.h&gt;
      #include &lt;GL\glfw.h&gt;
      #define FREEGLUT_STATIC
      #define _LIB
      #define FREEGLUT_LIB_PRAGMAS 0
      #include &lt;GL\freeglut.h&gt; */
  
  
      int main(int argc, char* argv[])
      {
          glutInit(&amp;argc, argv);
  
          // Obtain a buffer identifier from OpenGL
          GLuint bufferID = 0;
          glGenBuffers( 1, &amp;bufferID );
  
          // Bind the buffer object, OpenGL initially creates it empty.
          glBindBuffer( GL_ARRAY_BUFFER, bufferID );
  
          // Define three vertices to draw a right angle triangle.
          const GLfloat vertices[] = [
              0.f, 0.f, 0.f,
              1.f, 0.f, 0.f,
              0.f, 1.f, 0.f };
  
          // Tell OpenGL to copy data from the 'vertices' pointer into
          // the buffer object
          glBufferData(GL_ARRAY_BUFFER, 3*3*sizeof(GLfloat), vertices, GL_STATIC_DRAW );
          return 0;
      }
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code>With GLee:
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol _GLeeFuncPtr_glBufferData
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol _GLeeFuncPtr_glBindBuffer
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol _GLeeFuncPtr_glGenBuffers
  
  With the Unofficial OpenGL SDK:
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___gleBufferData
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___gleBindBuffer
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___gleGenBuffers
  
  With GLew:
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___glewBufferData
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___glewBindBuffer
  1&gt;gl_crap3.obj : error LNK2001: unresolved external symbol ___glewGenBuffers
  </code></pre>