Help linking to resolv using ns_name_uncompress

Peter Theobald petertheobald at yahoo.com
Wed Oct 23 21:37:29 UTC 2002


I hope someone can help me. I have a short simple C
program that looks up MX records.
I cannot compile it (actually link it), because I get
the following error:

gcc -o dnsmain dnsmain.o getmxrecords.o -lresolv
-lsocket
Undefined               first referenced
 symbol                     in file
__ns_name_uncompress        getmxrecords.o
ld: fatal: Symbol referencing errors. No ouput written
to dnsmain

I am linking to -lresolv, and I also tried specifying
/usr/lib/libresolv.so
I checked that the function I am calling is defined:
nm /usr/lib/libresolv.so | grep __ns_name_uncompress
[119]  |  87980|    84|FUNC |0   |9  
|__ns_name_uncompress

So it *IS* there in libresolv... why can't ld find
this function?!


Thanks in advance for any light that can be shed on
this...
Peter


=====
Peter Theobald / Turtle Cove Technology, Inc.
Peter at PeterTheobald.com

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


More information about the bind-users mailing list