SUMMARY: /usr/lib libraries contain ?

From: Marina Daniels (Marina.Daniels@ccd.tas.gov.au)
Date: Wed May 29 1996 - 00:23:37 CDT


This answer was the most useful:

 Use the "nm" utility found in /usr/ccs/bin. For example

                /usr/ccs/bin/nm /usr/lib/libadm.a

        will spit out a list of symbols (functions, variables, etc)
        found in the library. Another method is just to look for
        the man page of the function. For example, doing

                man socket

        give me the man page which tells me I need the -lsocket
        and -lnsl libraries.

Also, someone suggested using "ar" which works on libraries that end with .a but
not those with .so.1

Other people suggested I set my LD_LIBRARY_PATH variable, but that wasn't the
problem, I just wasn't sure which libraries I should be using.

Thanks very much to all those who answered
Marina

                                                -Greg

****ORIGINAL QUESTION:

Hello,

> I am trying to compile a 'C' program on a system running Solaris 2.3 -
> and I get undefined symbol messages so I realise I need to link in
> some libraries from /usr/lib, however I don't know which ones.
>
> Is there some command you can run on libraries which tells you which
> functions/procedures/variables they contain?

  



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:00 CDT