Hi,
I installed the libraries under Debian and I saw the Readme for Linux. The problem is that when I compile with “gcc -o esercizio esercizio.c” I get these errors:
/tmp/ccg9sIQj.o: In function main': /tmp/ccg9sIQj.o(.text+0x12): undefined reference to
glutInit’
/tmp/ccg9sIQj.o(.text+0x1f): undefined reference to glutInitDisplayMode' /tmp/ccg9sIQj.o(.text+0x34): undefined reference to
glutInitWindowSize’
/tmp/ccg9sIQj.o(.text+0x43): undefined reference to glutInitWindowPosition' /tmp/ccg9sIQj.o(.text+0x53): undefined reference to
glutCreateWindow’
/tmp/ccg9sIQj.o(.text+0x6a): undefined reference to glutCreateMenu' /tmp/ccg9sIQj.o(.text+0x83): undefined reference to
glutAddMenuEntry’
/tmp/ccg9sIQj.o(.text+0x95): undefined reference to glutAddMenuEntry' /tmp/ccg9sIQj.o(.text+0xa7): undefined reference to
glutAddMenuEntry’
/tmp/ccg9sIQj.o(.text+0xb7): undefined reference to glutCreateMenu' /tmp/ccg9sIQj.o(.text+0xd0): undefined reference to
glutAddMenuEntry’
/tmp/ccg9sIQj.o(.text+0xe6): undefined reference to glutAddSubMenu' /tmp/ccg9sIQj.o(.text+0xf8): undefined reference to
glutAddMenuEntry’
/tmp/ccg9sIQj.o(.text+0x105): undefined reference to glutAttachMenu' /tmp/ccg9sIQj.o(.text+0x115): undefined reference to
glClearColor’
/tmp/ccg9sIQj.o(.text+0x125): undefined reference to glutDisplayFunc' /tmp/ccg9sIQj.o(.text+0x12d): undefined reference to
glutMainLoop’
/tmp/ccg9sIQj.o: In function menu': /tmp/ccg9sIQj.o(.text+0x14a): undefined reference to
glutDestroyWindow’
/tmp/ccg9sIQj.o(.text+0x169): undefined reference to glutPostRedisplay' /tmp/ccg9sIQj.o: In function
disp’:
/tmp/ccg9sIQj.o(.text+0x17f): undefined reference to glClear' /tmp/ccg9sIQj.o(.text+0x190): undefined reference to
glutPostRedisplay’
/tmp/ccg9sIQj.o(.text+0x1af): undefined reference to glutWireTeapot' /tmp/ccg9sIQj.o(.text+0x1d1): undefined reference to
glutWireCube’
/tmp/ccg9sIQj.o(.text+0x209): undefined reference to `glutWireTorus’
collect2: ld returned 1 exit status
I thougth there is a problem with the Path. This is in the /etc/profile:
export LD_LIBRARY_PATH=/usr/local/glut-3.7/lib/glut/:/usr/local/glut-3.7/include/GL
:/usr/lib
Maybe I’ve to write this line instead of the previous:
export LD_LIBRARY_PATH=$GLUT_HOME/lib/glut/:$LD_LIBRARY_PATH
What can I do??
Bye
N@poleone