This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: for a specific glibc version, how could I get the functions declared in head file are implementation in which library?
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org, jcyrss <jcyrss at 163 dot com>
- Date: Mon, 14 Apr 2008 01:51:55 +0100 (BST)
- Subject: Re: for a specific glibc version, how could I get the functions declared in head file are implementation in which library?
- References: <12534807.post@talk.nabble.com> <200709062227.46006.vapier@gentoo.org> <16243610.post@talk.nabble.com> <200804131915.54942.vapier@gentoo.org>
On Sun, 13 Apr 2008, Mike Frysinger wrote:
> > I meant, If I want to use a function in glibc, I need to link with the
> > corresponding shared library, how could I know, which library I should link
> > with?
>
> there is only one library, the C library, and gcc automatically does "-lc" for
> you.
Well, sinf() for example needs -lm while clock_settime() -- -lrt. I
suppose the right place for such information are the glibc info pages, but
there is never enough force available onboard to put all the bits there.
There might be a book available on the market as well, but I have never
bothered checking that. Failing those, `objdump' on the libraries in
question will reveal which symbols they provide.
Maciej