January 19, 2012

qxoz qxoz
Area 51 Engineer
593 posts

Kubuntu 10.11 and OpenGL

 

Hi everybody!
I`m new on Linux. I try build “Boxes” demo from QtSDK but get the GL missing error:
error: GL/gl.h: No such file or directory

Where i can get OpenGL library and where i should place it on my Kubuntu?

Thanks for replays.

5 replies

January 19, 2012

sierdzio sierdzio
Area 51 Engineer
2327 posts

Use standard apt-get way to get OpenGL stuff. You have to install MESA dev packages. There are many available, I usually install most of them ;)

Example packages:

  • libgl1-mesa-dev
  • libglu1-mesa-dev
  • libopenvg1-mesa-dev
  • libglw1-mesa-dev

Those should also pull remaining packages as dependencies.

 Signature 

(Z(:^

January 22, 2012

qxoz qxoz
Area 51 Engineer
593 posts

I installed all
but there is new error:
/boxes/qtbox.cpp:327: error: ‘gluPerspective’ was not declared in this scope

may be i should setup some settings for it?

January 22, 2012

sierdzio sierdzio
Area 51 Engineer
2327 posts

Not sure. Usually, I keep installing new mesa packages as long as there are any errors. Usually works. I’ve been using it to run OpenGl in Qt5, so it should also work in Qt4.

 Signature 

(Z(:^

January 22, 2012

broadpeak broadpeak
Hobby Entomologist
360 posts

These two packages will be enough (in theory…) for opengl:

sudo apt-get install libgl-dev
sudo apt-get install libglu-dev

And of course, in your *.pro file for QtOpenGL module:
QT += opengl

January 25, 2012

qxoz qxoz
Area 51 Engineer
593 posts

Thank you for your replies
they was very helpful

 
  ‹‹ Advance Signals and Slots      problem with QDir::homePath() ››

You must log in to post a reply. Not a member yet? Register here!