gluNurbsCallback with invalid enumerant?

I try to run this code:
http://www.cs.kent.edu/~farrell/cg05/progs/openglbk/surfpoints.c

Now, each of the following calls will produce the errorcode GLU_INVALID_ENUM ( printed as “invalid enumerant” ).

gluNurbsCallback(theNurb, GLU_NURBS_BEGIN, beginCallback);
gluNurbsCallback(theNurb, GLU_NURBS_VERTEX, vertexCallback);
gluNurbsCallback(theNurb, GLU_NURBS_NORMAL, normalCallback);
gluNurbsCallback(theNurb, GLU_NURBS_END, endCallback);

Please, can someone tell me what’s wrong?

Just reading the bottom of that source, it says it uses GLU 1.3 features, depending on your OS, I would check your GLU version because I think Windows only has GLU 1.2 just check the value in

gluGetString(GLU_VERSION);

I think you can compile GLU 1.3 from the SGI sample implementation yourself here…

ftp://oss.sgi.com/projects/ogl-sample/download

or if you’re on Windows, there is a prebuilt set of libs and dlls here…

http://www.geocities.com/vmelkon/glu.html

Thank you, you are right.

gluGetStringGLU_VERSION) says GLU version 1.2.2.0.

In fact, I’ve already downloaded the Windows libs and dlls, but like the page says: “On some Windows versions, if you replace the old glu32.dll inside the system folder, the OS will overwrite the dll with the old one.”

My Windows version is XP and that was what happened. Is there any way to prevent the new dll to be overwritten? :-/

You should be able to place the dll in the same place as you are launching the exe and it will use that instead of the system glu32.dll