PDA

View Full Version : Facing problem for Hello world



ep
17th October 2015, 19:18
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.

anda_skoa
17th October 2015, 19:31
It would help if you tell us what "the error" is.

Cheers,
_

Zlatomir
17th October 2015, 19:35
The only thing not included is the error ;)
The code looks ok, tell us what is the problem.

ep
19th October 2015, 18:03
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

ChrisW67
19th October 2015, 20:50
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

ep
21st October 2015, 17:47
Hi thanks
I am using ubuntu and qt 5.5 version.

ep
28th November 2015, 16:32
Hi again,
After long time again i m trying the same. While compiling i got following error.


08:19:09: Running steps for project test...
08:19:09: Configuration unchanged, skipping qmake step.
08:19:09: 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
08:19:10: 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"
08:19:10: Elapsed time: 00:01.


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.

Radek
28th November 2015, 18:11
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/ .