PDA

View Full Version : conversion from enum{anonymous} to enum Glenum



MerCMe
09-02-2002, 04:57 PM
Ok, here is the deal. When I compile my test.cpp program I get this.

bash-2.04# make
g++ -O test.cpp -L/usr/X11R6/lib -lXmu -lX11 -lXext -lXi -lGL -lGLU -lglut
test.cpp: In function `void displayWire()':
test.cpp:70: conversion from `enum {anonymous}' to `enum GLenum'
make: *** [test] Error 1
I did the ldconfig. Fine there. I checked to see the libraries needed to run this were there. Hopefully I have all of it. As far as I know, I have all of it there.
Then I commented out at line 70 and the compilation and execution of the file was ok. It has something to do with the gluQuadraticDrawStyle(...).
Can you explain to me what is going on and how I can fix this error?
Thanks

[This message has been edited by MerCMe (edited 09-02-2002).]

[This message has been edited by MerCMe (edited 09-02-2002).]

Deiussum
09-02-2002, 07:00 PM
Post a bit of code around that line.

I do know that the gnu compilers don't support anonymous structs/unions before a certain version, but I'm not sure that has anything to do with your problem.

MerCMe
09-02-2002, 08:37 PM
glPushMatrix();
glTranslated(0,0,1.0);
GLUquadricObj * qobj;
qobj = gluNewQuadric();
gluQuadricDrawStyle(qobj,GLU_LINE);
gluCylinder(qobj, 0.2,0.2,0.4,8,8);
glPopMatrix();
glFlush();

Note: in the previous post, I typed gluQuadraticDrawStyle(...), well that is an error in my typing. I meant to say gluQuadricDrawStyle(...)

Thanks


Originally posted by Deiussum:
Post a bit of code around that line.

I do know that the gnu compilers don't support anonymous structs/unions before a certain version, but I'm not sure that has anything to do with your problem.



[This message has been edited by MerCMe (edited 09-02-2002).]