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. Default Facing problem for Hello world
QtWS25 Last Chance

Default Facing problem for Hello world

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.5k Views
  • 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
    eppy
    wrote on last edited by eppy
    #1

    hI

    i am very new to QT coding. I did the Hello world code for this. But i got the error.
    i have attached the all files for this project.

    https://drive.google.com/file/d/0B-nL-WSVphHDWUIyVnc1YlZST2M/view?usp=sharing

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

      Hi and welcome
      It is fine with the project but you should also write the error :)

      update:
      your project works here. When pressing buttons it does say "Hello Qt" :)

      So if you have compiler issue then write which compiler, your platform 32/64 bit and version of Qt.

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

        Hi
        Here is compilation result of the program

        10:00:10: Running steps for project test...
        10:00:10: Configuration unchanged, skipping qmake step.
        10:00:10: Starting: "/usr/bin/make"
        g++ -m32 -Wl,-rpath,/home/saag/Qt5.5.0/5.5/gcc -Wl,-rpath,/home/saag/Qt5.5.0/5.5/gcc/lib -o test main.o mainwindow.o moc_mainwindow.o -L/home/saag/Qt5.5.0/5.5/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
        /usr/bin/ld: cannot find -lGL
        collect2: error: ld returned 1 exit status
        make: *** [test] Error 1
        10:00:11: The process "/usr/bin/make" exited with code 2.
        Error while building/deploying project test (kit: Desktop Qt 5.5.0 GCC 32bit)
        When executing step "Make"
        10:00:11: Elapsed time: 00:01.

        :-1: error: cannot find -lGL
        :-1: error: collect2: error: ld returned 1 exit status

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

          @eppy said:

          cannot find -lGL

          it cannot find the GL library (opengl) so I assume its not installed in the linux ? version you are using.
          or for some reason cannot find it.
          I do wonder why its included in build string though as you program works on windows and i see no opengl in it.

          anyways try to install libglu1-mesa-dev
          as they talk about here
          https://forum.qt.io/topic/23310/solved-qt5-under-ubuntu-cannot-find-lgl/5

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

            Hi and welcome to devnet,

            To add to @mrjj it's the development package that is missing from your box.

            It's included because Qt uses OpenGL, the name of the library is different on Windows.

            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
            • E Offline
              E Offline
              eppy
              wrote on last edited by
              #6

              Hi thanks,

              I am using ubuntu. I install the qt 5.5 version.

              mrjjM 1 Reply Last reply
              0
              • E eppy

                Hi thanks,

                I am using ubuntu. I install the qt 5.5 version.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @mrjj said:
                if ubuntu 13.04
                try
                sudo apt-get install freeglut3-dev

                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