[solved] OpenGL /usr/bin/ld: cannot find -lGL

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yosh
Posts: 4
Joined: Fri Mar 11, 2011 10:48 pm

[solved] OpenGL /usr/bin/ld: cannot find -lGL

Post by yosh »

Hello,

I just discovered this wonderful SDK that is Irrlicht and i decided to give it a try. I followed installation instructions without any problem until I decide to compile a example code.

Here what i got :

Code: Select all

Makefile:47: Building...
g++ -I../../include -I/usr/X11R6/include  -O3 -ffast-math main.cpp -o ../../bin/Linux/01.HelloWorld -L../../lib/Linux -lIrrlicht -L/usr/X11R6/lib -lGL -lXxf86vm -lXext -lX11
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [all_linux] Error 1
(EDIT: plus all dependencies seem to be installed.)

I made some research and I figured out that the problem could come from my beta nvidia driver (GTX560 Ti).

So I decided to see if irrlicht would be working on my Windows7 session, and well... all worked perfectly.

I'm getting so frustrated not being able to code on unix yet...


Well... actually looking for help ! Thank you :)

yosh'


PS : both OS are in a x64 version.
Last edited by yosh on Sat Mar 12, 2011 1:57 pm, edited 2 times in total.
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Can't compile demo codes (openGL and drivers ?)

Post by randomMesh »

yosh wrote:/usr/bin/ld: cannot find -lGL
Your linker can't find the OpenGL library. See the wiki for how to resolve these dependencies.
"Whoops..."
yosh
Posts: 4
Joined: Fri Mar 11, 2011 10:48 pm

Post by yosh »

I forgot to say that all dependencies seem to be installed...
CuteAlien
Admin
Posts: 9825
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

If it doesn't find GL it means that dependency is missing. Did you check the link randomMesh did give you? It contains the -dev libs (not just the libs!) which must be installed.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
yosh
Posts: 4
Joined: Fri Mar 11, 2011 10:48 pm

Post by yosh »

Hi,
You know I both tried removing and reinstalling all those libs mentioned in the wiki.
So the main problem seems to be that I correctly followed instructions (and plus it's not my first API / SDK installation, but not on this computer by the way).
yosh
Posts: 4
Joined: Fri Mar 11, 2011 10:48 pm

Post by yosh »

UP : problem solved

It was an error with symLinks :

Code: Select all

rm /usr/lib/libGL.so
ln -s /usr/lib/libGL.so.xx.xx /usr/lib/libGL.so

Thank you for trying helping me : )
Post Reply