Game Development Community

Linking issue with -lGLU

by Ben Payne · in Technical Issues · 09/23/2008 (5:39 pm) · 5 replies

Hello all, I'm not sure if anyone has run across this problem. I am trying to compile the game engine in openSUSE 11.0 and I'm having a rough time getting everything working.
I have ensured that I have Mesa3D installed with all of its devel libraries. I am currently running into this compile issue. If anyone could help me get around it, It would totally make my day. I'm trying to write a 3D game engine report for school, and once I'm done with that I'll be building a game with Torque.

--> Linking out.GCC4.RELEASE/torqueDemo.bin
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make[1]: *** [out.GCC4.RELEASE/torqueDemo.bin] Error 1
make: *** [default] Error 2

Above is where my make command errors out. I have checked /usr/X11R6/lib which I think is where it is looking for the files, and nothing is in there. What do I need to install?

Thanks in advance...

-BP

#1
09/23/2008 (9:38 pm)
I don't develop on linux but have used gcc a lot. You are missing libglu.a which I'm sure you can download easily or maybe have sitting on your drive somewhere already. It's an OpenGL library.
#2
09/23/2008 (11:40 pm)
Thanks I'll look around and see if I can figure it out. I'll post my findings back here in this thread.
#3
09/24/2008 (8:18 am)
No go.... any idea what application might be packaged with that library?
#4
09/24/2008 (12:10 pm)
Do you have a libGLU.so? Historically it was possible to move the -lGLU before the -static in LINK.LIBS.GENERAL and just dynamically link with libGLU instead. FWIW I think most distros have a dynamic libGLU nowadays, I know my ubuntu machines do.

Regarding specific packages:
chunky@mills:~$ dpkg -S 'locate libGLU'
libglu1-mesa-dev: /usr/lib/libGLU.a
libglu1-mesa-dev: /usr/lib/libGLU.so
libglu1-mesa: /usr/lib/libGLU.so.1
libglu1-mesa: /usr/lib/libGLU.so.1.3.070002
ia32-libs: /usr/lib32/libGLU.so.1
ia32-libs: /usr/lib32/libGLU.so.1.3.070002
chunky@mills:~$

So at a guess, I'd imagine you need to install the mesa-dev package for your distro. Two minutes googling finds this:
http://www.novell.com/products/linuxpackages/opensuse/mesa-devel-static.html
Which contains libGLU.a

Gary (-;
#5
09/24/2008 (7:24 pm)
Looks like that was it...thanks!
I've got another issue now. I'll start a new thread.