Home >Backend Development >C++ >How to Fix the \'Qt: can\'t find -lGL error\' on Linux?
Resolving the "Qt: can't find -lGL error"
When attempting to compile a new Qt application, you may encounter the "cannot find -lGL" error. This problem stems from a missing dependency.
To rectify this issue, install the "libgl1-mesa-dev" package by executing the following command:
sudo apt install libgl1-mesa-dev
Once the package is installed, recompile your Qt application. The error should be resolved, allowing you to proceed with your development.
The above is the detailed content of How to Fix the 'Qt: can't find -lGL error' on Linux?. For more information, please follow other related articles on the PHP Chinese website!