resolver linking problem
Reggie
reg01 at atlbiz.com
Fri Aug 2 16:26:28 UTC 2002
I've been spent a great deal of time trying to get some simple resolver
related code to work but I'm at a dead end. I started out with a call to
res_query() which failed until I found out that you have to link to the
resolver library which I did. I then ran into trouble with a call to
ns_initparse() which I later found out is not part of the standard resolver
library and requires the bind library.
I'm running RH 6.0 so I downloaded the latest bind 9 release and did a full
install and used the configure option "--enable-libbind". I still ran into
trouble so I downloaded and installed the bind 8 release hoping that might
work. I'm not a seasoned linux developer and may have messed things up but
at this point, I believe I have just the bind 8 libbind and libbind_r
libraries in "/usr/local/bind/lib/".
When I attempt to compile with "gcc *.c -L/usr/local/bind/lib -lbind", I
get this error:
"`ns_msg' undeclared (first use in this function)".
If I uncomment the call to ns_intitparse() and the refernce to ns_msg, I
get this error:
"/tmp/cceoVUb5.o: In function `main':
/tmp/cceoVUb5.o(.text+0x24): undefined reference to `res_query'
collect2: ld returned 1 exit status"
I can add "-lresolv" and get it to compile with the call to ns_initparse()
commented out which makes me think either the standard resolver libarary
calls are not part of the bind library or I don't have the bind library
correctly installed. I don't know what I'm missing but I suspect it's
something simple.
Any help in getting the resolver functions correctly compiled/linked would
be greatly appreciated.
Thanks
Reg
More information about the bind-users
mailing list