Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling error: cannot find -lGLU and -lGL in kubuntu linux

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?

like image 575
G-71 Avatar asked Nov 30 '11 05:11

G-71


1 Answers

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
like image 102
favoretti Avatar answered Oct 08 '22 19:10

favoretti