Qt: can't find -lGL error

Hofmn picture Hofmn · Aug 23, 2013 · Viewed 89.9k times · Source

I just reinstalled QtCreator, created new project (Qt Application) an got this after compilation:

/usr/bin/ld: **cannot find -lGL**
collect2: error: ld returned 1 exit status
make: *** [untitled1] Error 1
18:07:41: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled1 (kit: Desktop Qt 5.1.0 GCC 32bit)
When executing step 'Make'

(Project is empty, I did'n commit any changes)

Qt Creator 2.7.2
Based on Qt 5.1.0 (32 bit)
Ubuntu 13.04

How do I solve this problem?

Answer

Sayyed Hassan Amiri picture Sayyed Hassan Amiri · Aug 29, 2013

You should install package "libgl1-mesa-dev":

sudo apt install libgl1-mesa-dev