*BSD News Article 31553


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!EU.net!Germany.EU.net!gomel.knirsch.de!knobel.knirsch.de!knobel.knirsch.de!andreas
From: andreas@knobel.knirsch.de (Andreas Klemm)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Libraries and X emulation
Date: 11 Jun 1994 16:27:29 GMT
Organization: @ $HOME, 41469 Neuss, Germany
Lines: 33
Message-ID: <2tcom3$1au@knobel.knirsch.de>
References: <Cr52A4.6x7@world.std.com> <DFR.94Jun10131655@minnow.render.com>
NNTP-Posting-Host: knobel.knirsch.de
X-Newsreader: TIN [version 1.2 PL2]

Doug Rabson (dfr@render.com) wrote:
: In article <Cr52A4.6x7@world.std.com> mcgovern@world.std.com (Brian J McGovern) writes:

: > Two quick questions....
: > 1.) Is there a utility for looking at the standard libraries in /usr/lib, and
: > deriving which functions are in which. Only being a semi-qualified Unix
: > programmer, I often have the problem of linking random libraries (with best
: > guesses) looking for a specific function call. If I could create a dynamic
: > list that I can "grep", it'd be perfect...

: Try "nm /usr/lib/*.a"

A little shell script does the job very well, too

#!/bin/csh -f
foreach i ( /usr/lib/lib*.a /usr/X386/lib/lib*.a )
echo "** $i"
nm $i | grep $1
end

The same for include files:

#! /bin/sh
find /usr/include -follow -name "*.h" -print \
| xargs grep $1

Best regards

	Andreas ///

--
Andreas Klemm                 /\/\____ Wiechers & Partner Datentechnik GmbH 
andreas@knobel.knirsch.de ___/\/\/     andreas@wupmon.wup.de (Unix Support)