PDA

View Full Version : Compiling in VC++



06-01-2003, 08:14 AM
I am getting a LNK2001: unresolved external symbol error when I try to compile my project with OpenGL code... It is happening for:
gl_Enable, gl_Disable, gluPerspective, and several other GL functions.

I've inlcuded gl.h, glu.h, glaux.h. I don't know if it's not finding these or what...

Any advice would be much appreciated!

Thanks.
Nels

yaro_dup1
06-01-2003, 08:39 AM
You have to include the files opengl32.lib and glu.lib in the linker options, or paste this code before calling any GL command:

#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")

cheers,
yaro