Linking Error in Ubuntu 10.04

Hi Everyone,
I am struggling with a linking problem. I am trying to rebuild an app in linux which used to work fine in windows. I am linking it against libGL, libGLU and libGLEW but it keeps saying:

cannot find -llibglut VideoGallery

I checked the paths with ldconfig tool:

ldconfig -v | grep GL
/sbin/ldconfig.real: Can’t stat /lib/i486-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can’t stat /lib64: No such file or directory
/sbin/ldconfig.real: Can’t stat /usr/lib64: No such file or directory
/sbin/ldconfig.real: Cannot stat /usr/lib/mesa/libGL.so: No such file or directory
libGLU.so.1 -> libGLU.so.1.3.070701
libGLEW.so.1.5 -> libGLEW.so.1.5.2
libGL.so.1 -> libGL.so.270.41.19

I have installed all libs and I am using NVIDIA driver on this machine.

Please help. Thanks

On debian/ubuntu, make sure to install freeglut-dev.
Or red-hat/fedora, sudo yum install freeglut-dev.
Then it should be -lglut and not -llibglut.

Thanks ZBuffer, But How about GL, GLU, GLUT and GLEW?

I still receive error:

make all
Building target: OpenGLTest
Invoking: GCC C++ Linker
g++ -L/usr/lib -o"OpenGLTest" ./src/OpenGLTest.o -lGL -lGLU -lglut
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status

Fixed it. The libs were: glut, GLU, GLEW, ftgl that I used.
Apparently no GL is needed.

Thanks

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.