I have the following code in my class object:
void Object::drawSurface()
{
GLUnurbsObj *nurbSurface;
nurbSurface = gluNewNurbsRenderer();
gluNurbsProperty( nurbSurface, GLU_SAMPLING_TOLERANCE, 25.0 );
gluNurbsProperty( nurbSurface, GLU_DISPLAY_MODE, GLU_FILL );
GLfloat knots[26] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
gluBeginSurface( nurbSurface );
gluNurbsSurface( nurbSurface, 26, knots, 26, knots,
13*3, 3, &points[0][0][0], 13, 13, GL_MAP2_VERTEX_3 );
gluEndSurface( nurbSurface );
}
Also a .txt file is also included, which contains an array with all the points.
Everything works fine until I include my class object in any other class. I then get this error:
ld: duplicate symbol _points in openglscene.o and main.o
collect2: ld returned 1 exit status
The compiler means the symbol points[] which is declared in the txt. I dont have a clue why this error emerges