Reputation: 1167
I downloaded QtSDK from website and installed on my computer, my OS is Ubuntu 10.04.
When I compile a project of OpenGL, there is an error "GL/gl.h no such file or directory".
but when I compile the projet under windows, it works. Why?
Who can resolve this problem for me?
Upvotes: 3
Views: 3501
Reputation: 162164
You need to install the OpenGL development files. In Ubuntu they're in the package libgl1-mesa-dev
. You'll also want to install libglu1-mesa-dev
.
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
I recommend installing GLEW alongside, since you'll jump the extension hoops to get OpenGL-3 functionality.
Edit
Here's how to get GLEW in Ubuntu (from the comments):
sudo apt-get install libglew-dev
Upvotes: 7