Cannot find -IGL in QT Project

When compile a GUI project in QtCreator, the error shows that “Cannot find -IGL”. It is probably because of missing libGL, so you just install the libGL.

COMMANDS

$sudo yum list | grep libGL //This is checking what kinds of libGL libraries in your sources.

The output like:

mesa-libGL.i686 9.2-0.5.el6_5.2 @updates
mesa-libGL-devel.i686 9.2-0.5.el6_5.2 @updates
mesa-libGLU.i686 9.2-0.5.el6_5.2 @updates
mesa-libGLU-devel.i686 9.2-0.5.el6_5.2 updates
mesa-libGLw.i686 6.5.1-10.el6 base
mesa-libGLw-devel.i686 6.5.1-10.el6 base

Thus, we should install the mesa-libGL.i686 & mesa-libGL-devel.i686

$sudo yum install mesa-libGL.i686 mesa-libGL-devel.i686

When completed, compile your project again and it will pass.