[Solved]"cannot find -lGL" error
-
Hello All,
This is my first first here. I am basically a Java and python programmer. I know C++ but today I decided to learn to use Qt to make GUI in C++.
I have installed QtCreator and QT Libraries using online installer on fedora 16.
I want to make a simple GUI at first. I dragged a button and a label on the form and on click the button it would show Hello world on the label.
But when I build the project it shows an error "cannot find -lGL"
@17:27:16: Running steps for project HelloWorld...
17:27:16: Configuration unchanged, skipping qmake step.
17:27:16: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/opt/Qt/5.1.0/gcc_64 -Wl,-rpath,/opt/Qt/5.1.0/gcc_64/lib -o HelloWorld main.o mainwindow.o moc_mainwindow.o -L/opt/Qt//5.1.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [HelloWorld] Error 1
17:27:16: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project HelloWorld (kit: Desktop Qt 5.1.0 GCC 64bit)
When executing step 'Make'
17:27:16: Elapsed time: 00:00.@The above is the compiler output I get. Please help and guide me how to solve it.
Thank you,
Sincerely,
Psycho_Coder -
Looks like you need to install the development libraries of OpenGL.
I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.
-
[quote author="Skyrpex" date="1377605874"]Looks like you need to install the development libraries of OpenGL.
I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.[/quote]
Well I used Ubuntu earlier. But now I use fedora, actually its been 4 days since I booted fedora.
I am at present downloading some OpenGL libraries but I don't know if they will work.Do you know any particular package for fedora I mean equivalent package.
-
Hi,
IIRC something like@yum install mesa-libGL-devel@
-
[quote author="SGaist" date="1377616658"]Hi,
IIRC something like@yum install mesa-libGL-devel@[/quote]
Thanks a lot I did that and now its working fine.
[quote author="Skyrpex" date="1377605874"]Looks like you need to install the development libraries of OpenGL.
I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.[/quote]
Thank you for your reply as this worked fine.
-
You're welcome !
Don't forget to update the thread's title prepending solved so other forum users will know a solution has been found :)
-
[quote author="SGaist" date="1377620428"]You're welcome !
Don't forget to update the thread's title prepending solved so other forum users will know a solution has been found :)[/quote]
I have did it. Thanks. Actually I am not new to forum system. I have to many forums and I am active in some forums. But those are mybb and SimpleMachines or phpBB forums and whenever a thread is solved a moderator marks it as solved. So I thought that there must be some kind of system like that.
However from now I will do as you said.