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!