Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [solved] Build error on Linux
Forum Updated to NodeBB v4.3 + New Features

[solved] Build error on Linux

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 1.2k 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.
  • A Offline
    A Offline
    adso
    wrote on last edited by
    #1

    Hi,
    I am trying to test Qt in a branch of Ubuntu 12.04 based Linux distribution.
    I created a blank desktop application and I get this lib error compiling:

    /home/francisco/Qt5.1.1/5.1.1/gcc/bin/uic ../prueba/mainwindow.ui -o ui_mainwindow.h
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../Qt5.1.1/5.1.1/gcc/mkspecs/linux-g++ -I../prueba -I../Qt5.1.1/5.1.1/gcc/include -I../Qt5.1.1/5.1.1/gcc/include/QtWidgets -I../Qt5.1.1/5.1.1/gcc/include/QtGui -I../Qt5.1.1/5.1.1/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../prueba/mainwindow.cpp
    g++ -Wl,-O1 -Wl,-rpath,/home/francisco/Qt5.1.1/5.1.1/gcc -Wl,-rpath,/home/francisco/Qt5.1.1/5.1.1/gcc/lib -o prueba main.o mainwindow.o moc_mainwindow.o -L/home/francisco/Qt5.1.1/5.1.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lGL
    collect2: ld returned 1 exit status

    Can anybody help me with the GL library or telll me what is wrong?
    Thanks
    PS: I installed many OpenGL libraries but without success

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you install the libgl1-mesa-dev package ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adso
        wrote on last edited by
        #3

        Thanks a lot, it was the problem, now it works.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Please update the thread title by prepending [solved] so other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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