Erro when running OpenGL projet under Ubuntu 10.04

I downloaded the QtSDK from the website and installed on my computer, my OS is Ubuntu 10.04.

When I compile an OpenGL project, I get the error "GL / gl.h no such file or directory".

but when I compile the project across windows it works. Why?

Who can solve this problem for me?


source to share

1 answer

You need to install the OpenGL development files. On Ubuntu, they are in the package libgl1-mesa-dev

. You will also want to install libglu1-mesa-dev


sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev


I recommend installing GLEW side by side, as you will be skipping the extension skins to get OpenGL-3 functionality.


Here's how to get GLEW in Ubuntu (from comments):

sudo apt-get install libglew-dev




All Articles