Results 1 to 8 of 8

Thread: Facing problem for Hello world

  1. #1
    Join Date
    Oct 2015
    Posts
    4
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Facing problem for Hello world

    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.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Facing problem for Hello world

    It would help if you tell us what "the error" is.

    Cheers,
    _

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Facing problem for Hello world

    The only thing not included is the error
    The code looks ok, tell us what is the problem.

  4. #4
    Join Date
    Oct 2015
    Posts
    4
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Facing problem for Hello world

    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

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Facing problem for Hello world

    Your (unspecified) operating system is missing the libraries necessary to support builiding a program requiring OpenGL. You need to to install those using whatever packaging system your environment supports. If there is the option, you want the development version of the package.

    It looks like Linux: http://doc.qt.io/qt-5/linux.html

  6. #6
    Join Date
    Oct 2015
    Posts
    4
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Facing problem for Hello world

    Hi thanks
    I am using ubuntu and qt 5.5 version.

  7. #7
    Join Date
    Oct 2015
    Posts
    4
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Facing problem for Hello world

    Hi again,
    After long time again i m trying the same. While compiling i got following error.
    Qt Code:
    1. 08:19:09: Running steps for project test...
    2. 08:19:09: Configuration unchanged, skipping qmake step.
    3. 08:19:09: Starting: "/usr/bin/make"
    4. 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
    5. /usr/bin/ld: cannot find -lGL
    6. collect2: error: ld returned 1 exit status
    7. make: *** [test] Error 1
    8. 08:19:10: The process "/usr/bin/make" exited with code 2.
    9. Error while building/deploying project test (kit: Desktop Qt 5.5.0 GCC 32bit)
    10. When executing step "Make"
    11. 08:19:10: Elapsed time: 00:01.
    To copy to clipboard, switch view to plain text mode 

    I m using ubuntu 14.04. I have attached qt version screen shot(bcoz there two versions has been mentioned.)

    I have attched project too.
    Plz help with this.
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Facing problem for Hello world

    All your posts point to the same error. As ChrisW67 has already noted, libGL.so (in Linux) has not been found, at least, in the places where it was searched. Run your file manager and search libGL.so . If you found one, check whether it is (or a link to it is) in the "standard places" for Qt. In Debian, I have found links to libGL.so and libGL.so.1 in /usr/lib/x86_64-linux-gnu/ .

Similar Threads

  1. Facing problem in installing QT.5.2.0
    By gunturrohith in forum Installation and Deployment
    Replies: 0
    Last Post: 3rd December 2014, 06:29
  2. I am facing a problem please help me !
    By sujan.dasmahapatra in forum General Programming
    Replies: 3
    Last Post: 16th September 2009, 14:12
  3. i am facing a problem with QTextEdit!!!
    By mismael85 in forum Qt Programming
    Replies: 9
    Last Post: 10th March 2008, 18:06
  4. Facing problem with Q3Canvas
    By jnana in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2006, 07:00
  5. Facing problem with qt-4.1 designer
    By jnana in forum Qt Tools
    Replies: 4
    Last Post: 8th March 2006, 18:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.