title: C++ GLFW GLEW LINK2019 unresolved external symbol __imp__glDrawArrays@12 referenced in function _main and LINK1120 1 unresolved external
body: <p>I'm using glfw and glew just to test drawing a triangle on the screen but when i added the code to draw the triangle it gives me a LINK2019 unresolved external symbol and a LINK1120 1 unresolved external error.</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  
  #include &lt;GL\glew.h&gt;
  #include &lt;GLFW\glfw3.h&gt;
  
  using namespace std;
  
  int main() {
      if (!glfwInit()) {
          fprintf(stderr, "GLFW has failed to initialize");
          return -1;
      }
  
      glfwWindowHint(GLFW_SAMPLES, 4);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
      glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  
      GLFWwindow* window = glfwCreateWindow(640, 480, "My OpenGL", NULL, NULL);
  
      if (!window) {
          fprintf(stderr, "Window has failed to initialize");
          glfwTerminate();
          return -1;
      }
  
      glfwMakeContextCurrent(window); 
      glewExperimental = true;
  
      if (glewInit() != GLEW_OK) {
          fprintf(stderr, "GLEW failed to initialize");
          glfwTerminate();
          return -1;
      }
  
      GLuint vaoID;
      glGenVertexArrays(1, &amp;vaoID);
      glBindVertexArray(vaoID);
  
      static const GLfloat verts[] = {
          // x, y, z
          -1.0f, -1.0f, 0.0f,
          1.0f, -1.0f, 0.0f,
          0.0f, 1.0f, 0.0f
      };
  
      GLuint vboID;
      glGenBuffers(1, &amp;vboID);
      glBindBuffer(GL_ARRAY_BUFFER, vboID);
      glBufferData(GL_ARRAY_BUFFER, sizeof(verts), verts, GL_STATIC_DRAW);
  
      while (!glfwWindowShouldClose(window)) {
          glBindBuffer(GL_ARRAY_BUFFER, vboID);
          glBufferData(vboID, sizeof(verts), verts, GL_STATIC_DRAW);
          glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
  
          glDrawArrays(GL_TRIANGLES, 0, 3);
  
          glDisableVertexAttribArray(0);
  
          glfwSwapBuffers(window);
          glfwPollEvents();
      }
  
      glfwTerminate();
      return 0;
  }
  </code></pre>
  
  <p>and heres the Linker -> Input -> Additional Dependencies that i put</p>
  
  <pre><code>glfw3.lib
  glfw3dll.lib
  glew32.lib
  glew32s.lib
  </code></pre>
  
  <p>btw I'm using VS 2017 as the ide</p>