Help wanted: Linking to libbind9 on Ubuntu Linux
Robert Edmonds
edmonds at mycre.ws
Tue Mar 20 20:51:15 UTC 2018
Ronald F. Guilmette wrote:
> In message <20180320193041.d2bwvgkgyvqemyff at mycre.ws>,
> Robert Edmonds <edmonds at mycre.ws> wrote:
>
> >For glibc versions that are less than about ten years old, these should
> >be available in libresolv, which is part of glibc.
>
> Thanks Robert! I added -lresolv to the link and now the link step is
> succeding.
>
> >See the resolver(3) manpage, which is probably in the manpages-dev
> >package on Ubuntu 14.
>
> For the record, I *did* look over that man page, and several others,
> before I posted my question. But neither that man page nor any of the
> several others I looked at ever said a word about the necessary extra
> -l option needed in order to drag in the needed resolver routines.
Hi, Ron:
It should be in the SYNOPSIS section :-)
http://manpages.ubuntu.com/manpages/trusty/en/man3/resolver.3.html
SYNOPSIS
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
[...]
Link with -lresolv.
--
Robert Edmonds
More information about the bind-users
mailing list