Opengl linker error

#include <windows.h>
#include <iostream>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glui.h>
#include <GL/glext.h>

and I get linker errors for all the opengl functions used. [Linker error] undefined reference to `glutSolidCube’ for example.

how can i fix this?