1

I have this error on Ubuntu Eclipse that doesn't go away:

Invoking: GCC C++ Linker
g++ -L/usr/lib/i386-linux-gnu -o "GLUT"  ./src/GLUT.o   -lglut -lGLU
/usr/bin/ld: ./src/GLUT.o: undefined reference to symbol 'glEnable'
//usr/lib/i386-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I searched for glut:

# find / -name *glut.so*
/usr/lib/i386-linux-gnu/libglut.so.3
/usr/lib/i386-linux-gnu/libglut.so.3.9.0
/usr/lib/i386-linux-gnu/libglut.so

Then I went to: project properties > C/C++ Build > Settings GCC C++ Linker > Libraries :

// added
Libraries (-l): glut GLU
Library search path (-L): /usr/lib/i386-linux-gnu

The error is still the same. Any suggestion on what step should I have missed? All comments are highly welcome.

Sophia Taylor
  • 248
  • 2
  • 8
  • 3
    I think you also need to add GL and GLU libraries, try adding them the same way – Dan Sep 02 '14 at 20:51

1 Answers1

4

You need to add also GL and GLU libraries, try adding them the same way.

Dan
  • 1,466
  • 1
  • 13
  • 27