Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]Qt5 Linux Sdk - Qt Gui Application doesnt compile "cannot find -lGL"
Forum Updated to NodeBB v4.3 + New Features

[Solved]Qt5 Linux Sdk - Qt Gui Application doesnt compile "cannot find -lGL"

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 8.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elendilm
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      Please install the OpenGL package(s) for your system. Sorry I do not know the exact name on mint.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • E Offline
        E Offline
        elendilm
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          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.

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • E Offline
            E Offline
            elendilm
            wrote on last edited by
            #5

            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.

            1. 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.

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              ZapB
              wrote on last edited by
              #6

              [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 ;)

              Nokia Certified Qt Specialist
              Interested in hearing about Qt related work

              1 Reply Last reply
              0
              • E Offline
                E Offline
                elendilm
                wrote on last edited by
                #7

                Thanks .... :)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlvljr
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved