# GLU linking errors with VS2005

**URL:** <https://discourse.glfw.org/t/glu-linking-errors-with-vs2005/456>\
**Category:** support\
**Created:** [January 29, 2008, 9:43am UTC](https://discourse.glfw.org/t/glu-linking-errors-with-vs2005/456 "2008-01-29T09:43:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 29, 2008, 9:43am UTC](https://discourse.glfw.org/t/glu-linking-errors-with-vs2005/456/1 "2008-01-29T09:43:47Z")

</div>

**nobody** wrote on [Tuesday, January 29, 2008](https://sourceforge.net/p/glfw/discussion/247562/thread/d199de03/#0ae8):

Hi everyone, I’ve been struggling getting GLFW installed correctly, and I finally managed to get it up and running without linker errors.

I then tried to write a small program with OpenGL, testing out my new and shiny GLFW.

Somehow, GLU doesn’t seem to be linked correctly anymore. GL-functions work, GLFW-functions work, but GLU-functions does not.

I’ve created a small testprogram to show you my errors and how they are created.

I get this error:  
error LNK2019: unresolved external symbol \_gluLookAt@72 referenced in function \_main glfwTest.obj

With this code:

#define GLFW\_DLL  
#include \<GL/glfw.h\>

int main( void )  
{  
int width = 500;  
int height = 500;

```
// Initialize GLFW
glfwInit\(\);

// Open an OpenGL window
if\( \!glfwOpenWindow\( width, height, 0,0,0,0,0,0, GLFW\_WINDOW \) \)
\{
	glfwTerminate\(\);
	return 0;
\}

// Testing GL-function:
glClear\( GL\_COLOR\_BUFFER\_BIT \);

// Testing GLU-function:
gluLookAt\( // Set camera position and orientation
  0.0, 0.0, 10.0, // Camera position \(x,y,z\)
  0.0, 0.0, 0.0, // View point \(x,y,z\)
  0.0, 1.0, 0.0 // Up-vector \(x,y,z\)
\);

```

}

Now, this code doesn’t make any sense alone, ofcourse, but it is only to demonstrate that only glu-functions does not work.

Coming here is a last resort, I’ve tried searching, following FAQ’s, reading other responses, but I cannot comprehend why this is happening.

Let’s see… What other information can I give… Yes, the linker dependencies are:  
opengl32.lib glfw.lib glfwdll.lib user32.lib  
If I remove any of these, it won’t compile. I’ve added lib’s and dll’s where they are supposed to be, and I haven’t edited any of the headers used.

Can anyone help me with this? GLFW seems like exactly what I want to use for my schoolproject, and being in charge of input management I really thought I had found the best lib to use now.

Thanks for taking the time to look at it,

regards Matias.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 29, 2008, 3:44pm UTC](https://discourse.glfw.org/t/glu-linking-errors-with-vs2005/456/2 "2008-01-29T15:44:51Z")

</div>

**[kohaistyle](https://sourceforge.net/u/kohaistyle/)** wrote on [Tuesday, January 29, 2008](https://sourceforge.net/p/glfw/discussion/247562/thread/d199de03/#ca4f):

maybe you forgot to link with glu32.lib ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 29, 2008, 3:58pm UTC](https://discourse.glfw.org/t/glu-linking-errors-with-vs2005/456/3 "2008-01-29T15:58:51Z")

</div>

**nobody** wrote on [Tuesday, January 29, 2008](https://sourceforge.net/p/glfw/discussion/247562/thread/d199de03/#0ae8/e088):

That was it…

I’ve never had to link it before, and not seeing it in examples identical to what I was working on, didn’t link it, I only tried to link glu.lib, but that didn’t exist ofcourse.

That you ever so much, have a nice day. 🙂
