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 ]error when i want run simple qt gui in ubuntu
Forum Updated to NodeBB v4.3 + New Features

[solved ]error when i want run simple qt gui in ubuntu

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 2.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.
  • M Offline
    M Offline
    mehdi.nine
    wrote on last edited by
    #1

    HI, i install qt 5.0.1 on ubuntu. when i create a new project and i want run it has this errors:

    !http://upload7.ir/images/06527886826827024536.jpg(Error)!

    and this is it's output:
    @
    20:43:14: Running steps for project untitled...
    20:43:14: Starting: "/opt/Qt5.0.1/5.0.1/gcc/bin/qmake" /opt/Qt5.0.1/Tools/QtCreator/bin/untitled/untitled.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
    20:43:14: The process "/opt/Qt5.0.1/5.0.1/gcc/bin/qmake" exited normally.
    20:43:14: Starting: "/usr/bin/make" -w
    make: Entering directory /opt/Qt5.0.1/Tools/QtCreator/bin/untitled-build-Desktop_Qt_5_0_1_GCC_32bit-Debug' /opt/Qt5.0.1/5.0.1/gcc/bin/uic ../untitled/mainwindow.ui -o ui_mainwindow.h g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../5.0.1/gcc/mkspecs/linux-g++ -I../untitled -I../../../../5.0.1/gcc/include -I../../../../5.0.1/gcc/include/QtWidgets -I../../../../5.0.1/gcc/include/QtGui -I../../../../5.0.1/gcc/include/QtCore -I. -I. -I. -o main.o ../untitled/main.cpp g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../5.0.1/gcc/mkspecs/linux-g++ -I../untitled -I../../../../5.0.1/gcc/include -I../../../../5.0.1/gcc/include/QtWidgets -I../../../../5.0.1/gcc/include/QtGui -I../../../../5.0.1/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../untitled/mainwindow.cpp /opt/Qt5.0.1/5.0.1/gcc/bin/moc -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../5.0.1/gcc/mkspecs/linux-g++ -I../untitled -I../../../../5.0.1/gcc/include -I../../../../5.0.1/gcc/include/QtWidgets -I../../../../5.0.1/gcc/include/QtGui -I../../../../5.0.1/gcc/include/QtCore -I. -I. -I. ../untitled/mainwindow.h -o moc_mainwindow.cpp g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../5.0.1/gcc/mkspecs/linux-g++ -I../untitled -I../../../../5.0.1/gcc/include -I../../../../5.0.1/gcc/include/QtWidgets -I../../../../5.0.1/gcc/include/QtGui -I../../../../5.0.1/gcc/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp g++ -Wl,-rpath,/opt/Qt5.0.1/5.0.1/gcc -Wl,-rpath,/opt/Qt5.0.1/5.0.1/gcc/lib -o untitled main.o mainwindow.o moc_mainwindow.o -L/opt/Qt5.0.1/5.0.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make: Leaving directory /opt/Qt5.0.1/Tools/QtCreator/bin/untitled-build-Desktop_Qt_5_0_1_GCC_32bit-Debug'
    make: *** [untitled] Error 1
    20:43:20: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project untitled (kit: Desktop Qt 5.0.1 GCC 32bit)
    When executing step 'Make'
    @

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

      Hi,

      You are missing the mesa lib 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
      • M Offline
        M Offline
        mehdi.nine
        wrote on last edited by
        #3

        Hi,can you explain more?

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

          The error you are seeing comes from a missing library (your build didn't complete).

          The library in question is libGL that is provided by the mesa lib package on Ubuntu.

          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
          • M Offline
            M Offline
            mehdi.nine
            wrote on last edited by
            #5

            when i type sudo apt-get install libgl1-mesa-dri it wrote this package is already newest version.

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

              Try libgl1-mesa-dev

              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
              • M Offline
                M Offline
                mehdi.nine
                wrote on last edited by
                #7

                thanks it worked.

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

                  You're welcome !

                  You did a little typo in your thread's title, it's solved not salved :)

                  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