glui /usr/bin/ld: cannot find -lXmu

Myx picture Myx · May 6, 2010 · Viewed 11.5k times · Source

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!

Answer

Zan Lynx picture Zan Lynx · May 6, 2010

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.