Default Facing problem for Hello world
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.
Hi and welcome
It is fine with the project but you should also write the error :)
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.
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
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
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.
I am using ubuntu. I install the qt 5.5 version.
if ubuntu 13.04
sudo apt-get install freeglut3-dev