I am trying to make 3D lorenz attractor but somehow not able to link it properly.
My code where it is showing problem is:
static void display(void)
{
int i;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glRotated(ph,1,0,0);
glRotated(th,0,1,0);
glBegin(GL_LINESTRIP);
for (i=0;i<N;i++)
{
glColor3fv(color[i];
glVertex3fv(pa[1]);
}
glEnd();
glColor3f(1,1,1);
glBegin(GL_LINES);
glVertex3d(0,0,0);
glVertex3d(1,0,0);
glVertex3d(0,0,0);
glVertex3d(0,1,0);
glVertex3d(0,0,0);
glVertex3d(0,0,1);
glEnd();
glRasterPos3d(1,0,0);
Print(“X”);
glRasterPos3d(0,1,0);
Print(“Y”);
glRasterPos3d(0,0,1);
Print(“Z”);
glFlush();
glutSwapBuffers();
}
Error showing is:
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glcolor3fv’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glvertex3d’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glvertex3d’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glvertex3d’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glvertex3d’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glprint’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glprint’
/tmp/cc4Vqewz.o:attractor.c:function display: error: undefined reference to ‘glprint’
The command I tried is gcc attractor.c -lm -lGL -lGLU -lglut
Kindly resolve the error. Thanks