How do I find which library in /usr/lib holds a certain function?

How do I find which library in /usr/lib holds a certain function?

What if you’re compiling and you’ve missed a library that needed linking in? All gcc reports are function names… Here’s a simple command that’ll find what you’re looking for:

for i in *; do echo $i:;nm $i|grep tgetnum 2>/dev/null;done

Where tgetnum is the name of the function you’re looking for.

Comments

comments

Powered by Facebook Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Content Protected Using Blog Protector By: PcDrome. & GeekyCube.