PDA

View Full Version : Error: GLUquadric



BartleyR7
06-09-2003, 06:32 AM
I have a problem when trying to use any of the glu primitives (gluCylinder, gluSphere, etc.) in Windows (using Visual Studio .NET). My program compiles and links correctly, but I get a run-time error that says:

Unhandled Exception: System.TypeLoadException: Could not load type GLUquadric from assembly figure, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

The name of my program is "figure" (figure.cc). Below is the code the error references.

h=gluNewQuadric();
gluQuadricDrawStyle(h, GLU_FILL);
t=gluNewQuadric();
gluQuadricDrawStyle(t, GLU_FILL);
lua=gluNewQuadric();
gluQuadricDrawStyle(lua, GLU_FILL);
lla=gluNewQuadric();
gluQuadricDrawStyle(lla, GLU_FILL);
rua=gluNewQuadric();
gluQuadricDrawStyle(rua, GLU_FILL);
rla=gluNewQuadric();
gluQuadricDrawStyle(rla, GLU_FILL);
lul=gluNewQuadric();
gluQuadricDrawStyle(lul, GLU_FILL);
lll=gluNewQuadric();
gluQuadricDrawStyle(lll, GLU_FILL);
rul=gluNewQuadric();
gluQuadricDrawStyle(rul, GLU_FILL);
rll=gluNewQuadric();
gluQuadricDrawStyle(rll, GLU_FILL);

Other (example) programs run fine on my computer and don't get this error. Any help would be greatly appreciated!

timfoleysama
06-09-2003, 12:02 PM
Umm... just from the look of that error message it seems like you are using Managed C++. It is possible that VC++ is trying to link to glu as a .NET managed lib, rather than as raw C/C++ code.