Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Jun 2013
Offline Last Active Jun 29 2015 04:17 AM

Topics I've Started

Weird GLEW linker error (VS 2012)

13 June 2013 - 07:38 PM

Hi, I'm new to both C++ and OpenGL. I only know the basics of the former, and practically nothing about the latter.

So I've been trying to follow this series of tutorials: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/


I can get GLFW to open a window just fine (ignoring GLEW by commenting out some code).


Around glewExperimental=true; is where I start to get issues. (based on what I've read, I believe it should technically be glewExperimental=GL_TRUE, but I get the same errors regardless). I get linker error "LNK2001 unresolved external symbol" thrown at me every time I try to build the project with the glewExperimental variable referenced. If I were to take that out and continue onward to the next tutorial, I get the same error for things like ___glewBindVertexArray and ___glewGenVertexArrays.


Glew seems to initialize fine though, and through trial and error it seems like the IDE can see the .lib and header just fine after I put them in the same place as GLFW's respective lib and headers.


I have GLEW_BUILD defined, the DLL is in a place where it can be seen. As far as I know I'm using the correct lib for the DLL version (glew32.lib), I have these additional dependencies defined: glu32.lib opengl32.lib glfwdll.lib glew32.lib - in that order. I've tried adding some other ones such as gdi32.lib to see if that would make a difference, it didn't.


I've tried the debug version of GLEW, I've tried building it myself. I've spent hours googleing a solution with no avail. No one else is having the same issue so I figure I must be doing something wrong, but I have no idea what.