why won't this compile
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int main(){
char name[] = "aa.example.com.";
char domain[] = "192.168.0.25";
int class = 1;
int type = 1;
char answer[400];
int anslen;
res_querydomain(name, domain, class, type, answer, anslen);
printf("%s", answer);
}
=================================================
I type gcc my.c and error message come out. I checked "man resolver" thought I inculde everything
[root@localhost root]# gcc my.c
/tmp/ccZmTCxo.o(.text+0x72): In function `main':
: undefined reference to `__res_querydomain'
collect2: ld returned 1 exit status
|