Eu tentei executar um openGL pgm no meu Ubuntu 14.04 e eu tenho o freeglut3 e o dev instalado. Mas ele retorna algumas 'Referências indefinidas' para todas as funções que eu usei no meu pgm.
rahul@rahul-System-Product-Name:~$ g++ -lGL -lGLU -lglut nrs1.c
/tmp/ccIsCRgh.o: In function 'myInit()':
nrs1.c:(.text+0x2a): undefined reference to 'glClearColor'
nrs1.c:(.text+0x37): undefined reference to 'glPointSize'
nrs1.c:(.text+0x43): undefined reference to 'glMatrixMode'
nrs1.c:(.text+0x48): undefined reference to 'glLoadIdentity'
nrs1.c:(.text+0x88): undefined reference to 'glOrtho'
nrs1.c:(.text+0xca): undefined reference to 'gluLookAt'
nrs1.c:(.text+0xd6): undefined reference to 'glMatrixMode'
nrs1.c:(.text+0xdb): undefined reference to 'glLoadIdentity'
/tmp/ccIsCRgh.o: In function 'triangle(float*, float*, float*)':
nrs1.c:(.text+0xee): undefined reference to 'glVertex3fv'
nrs1.c:(.text+0xf9): undefined reference to 'glVertex3fv'
nrs1.c:(.text+0x104): undefined reference to 'glVertex3fv'
/tmp/ccIsCRgh.o: In function 'tetra(float*, float*, float*, float*)':
nrs1.c:(.text+0x118): undefined reference to 'glColor3fv'
nrs1.c:(.text+0x13d): undefined reference to 'glColor3fv'
nrs1.c:(.text+0x162): undefined reference to 'glColor3fv'
nrs1.c:(.text+0x187): undefined reference to 'glColor3fv'
/tmp/ccIsCRgh.o: In function 'display()':
nrs1.c:(.text+0x4cb): undefined reference to 'glClear'
nrs1.c:(.text+0x4d7): undefined reference to 'glBegin'
nrs1.c:(.text+0x50e): undefined reference to 'glEnd'
nrs1.c:(.text+0x513): undefined reference to 'glFlush'
/tmp/ccIsCRgh.o: In function 'main':
nrs1.c:(.text+0x530): undefined reference to 'glutInit'
nrs1.c:(.text+0x53c): undefined reference to 'glutInitDisplayMode'
nrs1.c:(.text+0x550): undefined reference to 'glutInitWindowSize'
nrs1.c:(.text+0x564): undefined reference to 'glutInitWindowPosition'
nrs1.c:(.text+0x570): undefined reference to 'glutCreateWindow'
nrs1.c:(.text+0x57c): undefined reference to 'glutDisplayFunc'
nrs1.c:(.text+0x588): undefined reference to 'glEnable'
nrs1.c:(.text+0x592): undefined reference to 'glutMainLoop'
Por favor, sugira soluções. Obrigado.