PDA

View Full Version : Problems compiling with glu.h



gamber
01-04-2004, 08:39 PM
Hi, I had the following problem. I get the following error
error LNK2001: unresolved external symbol _gluPerspective. and is the same for all glu functions. but I get no errors with gl or glut functions. I've done everything. I know all *.h, *.lib and *.dll are in place but I still get ther error with glu functions. Any ideas?, thanks for your help in advance

storm
11-18-2011, 05:31 AM
did you solve the problem? I have the same problem now?
It really frustrated me. When I create a new project, it can use glu functions. looking forward to replying me. Thanks!

mobeen
11-23-2011, 05:15 AM
Well from my experience, there are two causes for this,
1) When the glu.h is not coming from the default location and it is coming from some other project which has modified glu.h . This you can check by opening the included gl/glu.h by right clicking the include and open containing folder.
2) You are missing glu32.lib as additional library in the linker settings. In visual studio, go to your project->properties->Linker->input->Add. depend. and add glu32.lib
You may also add it programmatically like this,


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


See if this helps.