Using Qt without openGL
12,268
installed Qt on Ubuntu --> How..? Which Version? Did you configure it? You can configure it while installing, and if you do not want OpenGL you can just give option
-no-opengl
when I try to comiple a project it reports error: cannot find -lGL --> But if your project needs OpenGL, what is the point in having "No OpenGL"? you should rather install OGL development libraries(see datenwolf's comment) so that you can work on the project.
Author by
Aleksa
Updated on June 04, 2022Comments
-
Aleksa almost 2 years
I installed Qt on Ubuntu and when I try to comiple a project it reports error: cannot find -lGL. But I am having problem with installing openGL library so I wanna know if it is possible to use Qt without openGL, to somehow exclude that library from linking...
-
datenwolf over 10 yearsYou normally install libraries from a package manager in Linux. That Qt
-no-opengl
thing is a build option, and usually only made use of in Windows, which has poor OpenGL support by default. On Linux OpenGL is usually always available if there's a graphics system installed. OP just misses the opengl development libraries, which actually should be dependencies of the Qt development package, i.e. should be automatically installed together with the Qt development package when installing using the package manager. -
Aleksa over 10 yearsThis is what I get when try to install OpenGL: libgl1-mesa-dev : Depends: mesa-common-dev (= 8.0.4-0ubuntu0.6) or mesa-common-dev-lts-quantal but it is not going to be installed or mesa-common-dev-lts-raring but it is not installable E: Unable to correct problems, you have held broken packages.
-
Aleksa over 10 yearsAfter that I install messa-common-dev and few other dependencies, but than my Ubuntu crashes and I cant start it again. I run it on VirtualBox...
-
Adorn over 10 years@AleksaStancetic You can use Qt without opengl, but to install it(either by manually building or direct installer) you are going to need opengl. The exact reason of crash can vary a lot, you are also running it on VirtualBox, as you might know how VM works, it actually communicates to host OS to get actual service from h/w. Here is a quick link -- askubuntu.com/questions/162075/… which tries to cover how to solve your crash problem
-
Adorn over 10 years@datenwolf If someone wants to go unusual way, it is possible. His question asks can he use Qt without opengl .. answer is yes! (though for installation it is needed). I think using opengl or not is completely dependent on what kind of application one is going to work on and not on windows/linux. Still I would like a link or something stating your usually's!
-
Aleksa over 10 yearsI don't use opengl in my projects so excluding it from build path would do the work, how can I do it? But after searching a little bit I think I have opengl installed, but it is not in usr/lib but in /usr/lib/i386-linux-gnu/mesa/ so maybe I need to change that path somewhere in Qt...