Compiling error: cannot find -lGLU and -lGL in kubuntu linux
13,408
You need the following 2 packages:
xlibmesa-gl-dev
xlibmesa-glu-dev
-- edit --
Thanks for correction @ephemient, these were obsolete names, right names are:
libgl1-mesa-dev
libglu1-mesa-dev
Comments
-
G-71 almost 2 years
I have some problems with compiling "hello world" application in kubuntu linux 11.10. This is project file:
// opengltext.pro SOURCES += \ main.cpp QT += opengl
And one cpp file:
// main.cpp #include <QApplication> int main( int argc, char *argv[] ) { QApplication app( argc, argv ); return app.exec(); }
i have got the following errors:
:-1: error: cannot find -lGLU :-1: error: cannot find -lGL :-1: error: collect2: ld returned 1 exit status
I try find in google the solution of this problem. But didn't find. i try to install:
sudo apt-get install libglw1-mesa-dev
but this error is still taking place
What's the problem?
-
pR0Ps about 12 yearsIf your system reports that you already have the packages and it still isn't working, try reinstalling them via your package manager. I already the packages installed, but for some reason I was missing the required
libGL.so
files. Reinstalling fixed the problem. -
Jakob Simon-Gaarde over 9 yearsThanks pR0Ps - reinstalling worked for me to: aptitude reinstall libgl1-mesa-dev