Search code examples
openglglu

unresolved external symbol _gluLookAt@72 referenced in function


I'm making a program using the glu library but when i compile i got this error:

1>opengl_3.obj : error LNK2019: unresolved external symbol _gluLookAt@72 referenced in function "public: void __thiscall OpenGLContext::setupScene(void)" (?setupScene@OpenGLContext@@QAEXXZ)

I included GL/glu.h and checked if the lib and dll were present. (they are by default) I'm using visual studio 2012.

Any idea where this error is coming from?


Solution

  • You are not linking to glu. Add glu to the libraries against which your program should be linked. A more detailed description can be found here.