views:

291

answers:

2

Hello:

I have downloaded the latest GLUI source code and now I am trying to compile it. When I do so, I get the following error:

g++ -O0 -Wall -pedantic -I./ -I./include -I/usr/X11R6/include -o bin/example1 example/example1.cpp  -L./lib -lglui -L/usr/X11R6/lib/libXdmcp.a -lglut -lGLU -lGL -lXmu -lXext -lX11 -lXi -lm
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status

When I did a locate libXmu, I get the following output:

> %:~/src/GLUI/src$ locate libXmu 
> /usr/lib/libXmu.so.6
> /usr/lib/libXmu.so.6.2.0
> /usr/lib/libXmuu.so.1
> /usr/lib/libXmuu.so.1.0.0

Do I get the error because I don't have a /usr/lib/libXmu.so? If this is the case, how can I make one? (I am not experienced with linking at all).

Thanks!

+1  A: 

Linux distributions usually package the libraries needed for running programs separately from the files needed to build programs.

Look for packages named *-devel or *-dev.

I don't know which one you need in particular for this, but you can use apt-cache search to look for it.

Zan Lynx
A: 

The answer was actually one of the first ones here originally but the owner deleted it, it seems. I was able to solve the problem by creating a symbolic link to the latest version of the library (i.e. /usr/lib/libXmu.so.6) and compile the code successfully.

Myx