I just installed the OpenGL library (actually most of source done in my computer already) and I try to compile the first program.

For x86 was run perfectly, however, for x64 that I config and redirect glut32.lib from 

> 
> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
> 
> 
> 

to

> 
> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64
> 
> 
> 

error has occur as below, I don't know to solve this problem. The error seem like I haven't link the library correctly? 

```
error LNK2019: unresolved external symbol __imp_glutSwapBuffers referenced in function "void __cdecl drawcube(void)" (?drawcube@@YAXXZ)
error LNK2019: unresolved external symbol __imp_glutMainLoop referenced in function main
error LNK2019: unresolved external symbol __imp_glutIdleFunc referenced in function main
error LNK2019: unresolved external symbol __imp_glutDisplayFunc referenced in function main

```

My testing code is like this

```
<!-- language: cpp -->
void drawcube(void)
{

    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 1.0, 1.0);
    glMatrixMode(GL_MODELVIEW);
    glRotatef(angle, 0.0, 1.0, 0.0);
    glBegin(GL_LINE_LOOP);
    glVertex3iv(a);
    glVertex3iv(b);
    glVertex3iv(c);
    glVertex3iv(d);
    glEnd();
    glFlush();
    glutSwapBuffers();
}

<!-- language: cpp -->
int main(int argc, char **argv)
{

    glutInit(&argc, argv);
    glutInitWindowSize(800, 600);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutCreateWindow("Test OpenGL");
    glutDisplayFunc(drawcube);
    glutIdleFunc(drawcube);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(-30.0, 30.0, -30.0, 30.0, -30.0, 30.0);
    glRotatef(30.0, 1.0, 0.0, 0.0);
    glMatrixMode(GL_MODELVIEW);
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glutMainLoop();

    return(0);
}

```

---

Answer from @datenwolf was useful.

I just change to use freegult without error for complied in x64.