[Solved]Qt5 Linux Sdk - Qt Gui Application doesnt compile "cannot find -lGL"
-
I downloaded the open source version of Qt5 from the qt-project website. After installing it in my Linux Mint 13 KDE, I trie to Start a new project i.e Qt Gui Application (the old mainwindow application like 4.8.1). BUT while compiling it says
"cannot find -lGL".. I was hoping this basic application would work-out-of-the-box. Now I dont know what to do. Please help -
Please install the OpenGL package(s) for your system. Sorry I do not know the exact name on mint.
-
Thanks for the response.
But Will compiling it after installing opengl packages run on those computers that dont have opengl installed. And this is a standard Qt Gui Application that we are talking about and not Qt Quick Application, so why the Qt team decided to have opengl dependancy for it.
I ask this because I wanted to install qt5 in pc's that do not have net connection and earlierl releases of Qt offline sdk worked out of the box. -
The default build of Qt 5 that ships in the installers is linked to libGL so that QtQuick2 can take advantage of of or so that desktop developers can write applications that use OpenGL.
If you wish to have a build that does not include OpenGL support you will need to build this yourself. The majority of systems these days have some kind of OpenGL capability so the released packages target the majority.
Really though, the requirement to have libGL installed is not too onerous. The one form mesa will do perfectly fine. It's not like anybody is forcing you to install proprietary binary blobs.
For the machines that don't have network connections, well just put the mesa/GL packages onto the same usb stick/hdd as the Qt installation package.
-
Thanks...
So I installed libgl1-mesa-dev and now it works.....But now that it works I have 2 another problem... I suppose I should open a new discussion but it somehow seems a qt5 question.
1)The default theme in the Qt5-Qt Gui Application is not the native KDE theme. QWidgets looks really bad compared to the native plasma buttons. and QMessagebox is really awkward. anybody knows why this native theme is not applied to default QWidget applications.
- Every time I build the application from QtCreator the application prints an error to the standard output/error:
"Qt at-spi: error getting the accessibility dbus address: "The name org.a11y.Bus was not provided by any .service files" Accessibility DBus not found. Falling back to session bus."
If the question is out of topic, moderators feel free to move to another discussion.
- Every time I build the application from QtCreator the application prints an error to the standard output/error:
-
[quote author="elendilm" date="1356171200"]Thanks...
So I installed libgl1-mesa-dev and now it works.....But now that it works I have 2 another problem... I suppose I should open a new discussion but it somehow seems a qt5 question.
[/quote]Great!
[quote author="elendilm" date="1356171200"]
1)The default theme in the Qt5-Qt Gui Application is not the native KDE theme. QWidgets looks really bad compared to the native plasma buttons. and QMessagebox is really awkward. anybody knows why this native theme is not applied to default QWidget applications.
[/quote]It is because the KDE styles are built using Qt4 and so the style plugins from KDE will not load in a Qt5 application - until somebody ports and ships KDE built against Qt5, well at least the Oxygen style. The new default style for Qt on Linux is the Fusion style iirc.
[quote author="elendilm" date="1356171200"]
2) Every time I build the application from QtCreator the application prints an error to the standard output/error:
"Qt at-spi: error getting the accessibility dbus address: "The name org.a11y.Bus was not provided by any .service files" Accessibility DBus not found. Falling back to session bus."
[/quote]I get this too. I think it is harmless unless you specifically want the accessibility features offered by that service. I agree it would be nice if it wasn't so vocal about it though ;)
-
Thanks .... :)
-
To solve the spi warning issue (that can be annoying and obscure real errors), at least on Ubuntu 12.04 with Qt5, one can do the following:
-
read the last section of:
http://techbase.kde.org/Development/Tutorials/Accessibility/Screen_Reader_Setup#How_to_test_at-spi2_with_Qt -
install qt-at-spi:
sudo apt-get install qt-at-spi -
install libatspi 2.0:
sudo apt-get install libatspi2.0-0
-