Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator : QtGui include error

Tags:

I wanted to learn Qt and so downloaded Qt library(5.0) and Qt creator for windows. There, I was not able to access QNetworkAccessManager..it gave an error when I included QNetworkAccessManager I wasn't able to figure out the reason of the error and I was dual-booting with Ubuntu. So I downloaded Qt for Ubuntu and started using it, but, this time it is giving an error when I am including QtGui. The errors are:

/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopenglcontext.h:60:
  In file included from ../../../Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopenglcontext.h:60:0,
/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/QtGui:33:
  from ../../../Qt5.0.0/5.0.0/gcc_64/include/QtGui/QtGui:33,
/home/shaarad/Documents/JIGS/JIGS-FILE-SHARING-master/MainFrame.cpp:5:
  from ../JIGS-FILE-SHARING-master/MainFrame.cpp:5:
/home/shaarad/Qt5.0.0/5.0.0/gcc_64/include/QtGui/qopengl.h:98: 
  error: GL/gl.h: No such file or directory

Any workaround will be helpful, thanks a lot! :)

like image 234
upInCloud Avatar asked Jan 06 '13 17:01

upInCloud


2 Answers

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

Those two provided the solution.

like image 195
Rob Avatar answered Oct 02 '22 08:10

Rob


You are missing the OpenGL include files. Install the mesa-common-dev package:

# apt-get install mesa-common-dev

This includes the /usr/include/GL directory.

like image 39
Andreas Fester Avatar answered Oct 02 '22 08:10

Andreas Fester