PDA

View Full Version : C++ opengl linker error



jynx
December 1st, 2008, 10:49 AM
#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?

Charleh
December 2nd, 2008, 10:10 AM
Are you sure the headers are being included? Do you get any warnings about missing headers?

Also have you added the gl libs to the project includes?

firedraco
December 3rd, 2008, 12:43 AM
Yes, it the libs. If the headers aren't being included, you would be getting complier errors, not linker errors.