Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Default Facing problem for Hello world

    General and Desktop
    3
    7
    1047
    Loading More Posts
    • 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
      eppy last edited by eppy

      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 Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        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 Reply Quote 0
        • E
          eppy last edited by eppy

          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 Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion last edited by

            @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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • E
                eppy last edited by

                Hi thanks,

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

                mrjj 1 Reply Last reply Reply Quote 0
                • mrjj
                  mrjj Lifetime Qt Champion @eppy last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post