What is "-lXi" and "-lXmu"?

one thing happend when i try to compile my “hello world” with something like this

gcc -o my_test main.c -lGL -lGLU -lglut -L/usr/X11R6/lib -lXi -lXmu

but complier says to me that don’t recognice
-lXmu and when i compile with out “-lXi” and
“-lXmu”, there is no problem

does anybody know what is “-lXi” and “-lXmu” parameters?

i have a RH8 box

Those are instructions to gcc to link in the libraries /usr/X11R6/lib/libXi.so and libXmu.so at link-time. I found I needed them for my little glut app to build on Redhat 9.

If your glut app builds and runs without explicitly linking to them – great. :slight_smile: (Though, in that case, I don’t know what’s going on – maybe libglut.so has those libs statically linked into it?)

the -l just says search for and link to these libraries when linking. In this case you want to search the Xi and Xmu libraries and link to whatever calls your using in your program. Those libraries are just Xlib libraries I believe.

Old GLman

thank you for your help.
I leter i will search wath are those libs.

Just for the record (or in case you wonder)
Xmu is the X Miscellaneous Utilities Library and
Xi is the X Input Device Extension Library

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.