3

I installed Linux Debian yesterday and then the latest Qt version. Today I installed gcc and g++. But the problem is, it doesn't build and run when I create a GUI Application.

Whenever I create a new Project, select the gui and don't even change anything it doesn't compile and I get this message :

/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: * [untitled] Error 1 14:17:36: The process "/usr/bin/make" exited with code 2. Error while building/deploying project untitled (kit: Desktop Qt 5.1.1 GCC 64bit) When executing step 'Make'

Seems like I'm missing a library but I don't know how to install it. I don't even know which one it is.

Can anyone help me?

László Papp
  • 51,870
  • 39
  • 111
  • 135
Davlog
  • 2,162
  • 8
  • 36
  • 60

2 Answers2

2

Try:

apt-get install libgl1-mesa-glx

The dev packages are actually not the problem. You have a linker error, not a compiler error.

Depending on your graphic card you might use specialized OpenGL implementation, e.g. something like libgl1-nvidia-glx fror NVIDA cards.

Greenflow
  • 3,935
  • 2
  • 17
  • 28
  • The problem is there's no OpenGL library to link with. – Violet Giraffe Sep 01 '13 at 12:36
  • That's what I wrote: The problem is not the dev package. The dev package would pull in the lib, too, but the include files, which are also in the dev package, are not strictly necessary for his problem. – Greenflow Sep 01 '13 at 12:38
1

Apparently, you need to install openGL dev package. Sorry, don't remember the package name.

Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335