Friday, January 4, 2013

cannot find -lGL

I have just installed Qt 5 on Ubuntu, and tried my first Hello World. But fail in Build with error of "cannot find -lGL"!

cannot find -lGL


It's OpenGL API missed.

To install OpenGL library, you can install libgl1-mesa-dev and libglu1-mesa-dev using Ubuntu's Package Manager, and also the other required packages.

Open Synaptic Package Manager, search and install libgl1-mesa-dev and libglu1-mesa-dev, and accept install the required packages.

install libgl1-mesa-dev

install libglu1-mesa-dev


After installed, re-build my Qt project, and OK DONE.

Success