This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]