Problem compiling example in the book

John Heiden jheiden2 at pop3.utoledo.edu
Fri Apr 12 23:49:24 UTC 2002


This isn't entirely a BIND issue, but recently I bought "the book" by
Paul Albitz and Cricket Liu.  (Very good book, by the way.)

Anyway, I am trying to compile the example in the book, and I am
unable to.  I am trying to compile with GCC 3.0 under SPARC
Solaris 7.  Here's what I get:

checksoa.c: In function `queryNameServers':
checksoa.c:435: warning: passing arg 1 of `ns_name_skip' from
incompatible pointer type
checksoa.c:436: warning: passing arg 1 of `ns_name_skip' from
incompatible pointer type
Undefined                       first referenced
 symbol                             in file
gethostbyname                       /var/tmp/cckFrApA.o
_res                                /var/tmp/cckFrApA.o
res_mkquery                         /var/tmp/cckFrApA.o
h_errno                             /var/tmp/cckFrApA.o
__ns_parserr                        /var/tmp/cckFrApA.o
__ns_initparse                      /var/tmp/cckFrApA.o
__ns_get32                          /var/tmp/cckFrApA.o
res_send                            /var/tmp/cckFrApA.o
res_init                            /var/tmp/cckFrApA.o
__ns_name_uncompress                /var/tmp/cckFrApA.o
_ns_flagdata                        /var/tmp/cckFrApA.o
ns_name_skip                        /var/tmp/cckFrApA.o
res_query                           /var/tmp/cckFrApA.o
QueryNameServers                    /var/tmp/cckFrApA.o
ld: fatal: Symbol referencing errors. No output written to checksoa.exe
collect2: ld returned 1 exit status


I have tried to compile two different ways (same results):

gcc -I/usr/include -o checksoa.exe checksoa.c
gcc -o checksoa.exe checksoa.c

I have to say, I don't have as much experience with gcc as I would
like.

Is there a place I could just download the code from?  After typing for
quite a while, I found I made 3 typos.  Is it possible I overlooked
another
typo?  Or is there maybe a typo in the book?

Thank you much for your time on this.


John Heiden
Network Engineer
The University of Toledo
Toledo,  OH  43606
jheiden2 at pop3.utoledo.edu



More information about the bind-users mailing list