LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to see which shared libraries are linked to a program (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-see-which-shared-libraries-are-linked-to-a-program-256837/)

zsjoska 11-19-2004 09:22 AM

How to see which shared libraries are linked to a program
 
I just want to see a list of the shared libraries to which is linked an application.

e.g. if an application was liked with -lm
I want to see in the list "m" or "libm", etc.
Is in linux a command which shows this ?

Thanks for your help,
zsjoska.

theYinYeti 11-19-2004 09:30 AM

Example:
ldd /usr/X11R6/bin/glxinfo

Yves.

browland601 11-19-2004 01:45 PM

I will also add something as I encountered this quite recently.

ldd ... etc. will show you the libraries statically linked (at compile), but there may also be ones dynamically pulled in when (eg) glxinfo is loaded.

If you think this is the case (i.e. you still seem to be missing libraries) you can use strace:

strace -o outfile /usr/X11R6/bin/glxinfo

This will then run glxinfo as above but also output what it's doing to load in modules at runtime.

You can then do:

less outfile

to view any problems in detail. Look for <module_name>.so.0 etc. Then you just have to figure out which errors matter! :(

Cheers,

Ben


All times are GMT -5. The time now is 04:38 PM.