This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Linking with libresolv
- From: "David Gómez" <davidge at viadomus dot com>
- To: <libc-alpha at sources dot redhat dot com>
- Date: Wed, 9 Jan 2002 01:00:37 +0100 (CET)
- Subject: Linking with libresolv
Hi,
I've done a small test program to learn how to use libresolv, but it
seems that calls to ns_* cannot be linked correctly:
# gcc -lresolv test.c -o test
/tmp/ccXMdtVK.o: In function `main':
/tmp/ccXMdtVK.o(.text+0x45): undefined reference to `__ns_initparse'
/tmp/ccXMdtVK.o(.text+0x8b): undefined reference to `__ns_parserr'
collect2: ld returned 1 exit status
But res_* functions work fine. Surely i'm forgetting something, like
another library to link with, but i'm a bit lost. I'm using glibc 2.2.4
Anybody can tell me what i'm doing wrong?
Thanks in advance,
David Gómez