> ------> [b]Comments[/b]: I gave the -lsocket option
> to the linker options so the compiler it could
> recognize the socket() library. It was succsesful at
> some point because the errors were few like below
>
> root at openenux:/export/home/enid/aim7# make
> cc -O -c multitask.c
> cc -O -c fillin.c
> cc -O -c rand.c
> cc -O -c rtmsec.c
> cc -O -c add.c
> cc -O -c disk1.c
> cc -O -c div.c
> cc -O -c funcal.c
> cc -O -c mul.c
> cc -O -c ram.c
> cc -O -c creat-clo.c
> cc -O -c disk_src.c
> cc -O -c int_fcns.c
> cc -O -c num_fcns.c
> cc -O -c pipe_test.c
> cc -O -o multitask multitask.o fillin.o rand.o
> rtmsec.o add.o disk1.o div.o funcal.o mul.o ram.o
> creat-clo.o disk_src.o int_fcns.o num_fcns.o
> pipe_test.o -lm -lsocket
> Undefined first referenced
> symbol in file
> ethostbyname pipe_test.o
> (symbol belongs to implicit dependency
> /lib/libnsl.so.1)
> d: fatal: Symbol referencing errors. No output
> written to multitask
> collect2: ld returned 1 exit status
> make: *** [multitask] Error 1
You need more libraries, `-lnsl' in this case. See the man page for
`gethostbyname':
NAME
gethostbyname, gethostbyname_r, gethostbyaddr,
gethostbyaddr_r, gethostent, gethostent_r, sethostent,
endhostent - get network host entry
SYNOPSIS
cc [ flag... ] file... -lnsl [ library... ]
#include <netdb.h>
--
This message posted from opensolaris.org