[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: your mail



Huayan,

for some reason, two libs are missing:

    -lsocket -lnsl

They should be in /usr/lib

Try patching your Makefile (or Makefile.in and do a ./configure) by
appending this after "-lm" and see if it works.

    -Chris.


----------
> From: Huayan Wang <[email protected]>
> To: Shahzad Ali <[email protected]>
> Cc: [email protected]
> Subject: Re: your mail
> Date: Friday, September 26, 1997 3:45 PM
> 
> 
> On Fri, 26 Sep 1997, Shahzad Ali wrote:
> 
> > 
> > 
> > Hi,
> > 
> > I am trying to install ns v2 with Tclv7.6 and Tk v4.2.  While compiling
> > the source code for otcl, I got this error.  i was wondering if you
could
> > help me with this error.  The error is during the link phase of the
> > compilation process.  I am enclosing the exact error that the linker is
> > giving me.
> > Thanks 
> > 
> > Shahzad
> > 
> > gcc -o otclsh -g -O -I. -I../tcl7.6/generic
> > -I../tk4.2/bin/include -I/usr/local/X11R6/include otclAppInit.c \
> > -L. -lotcl -L../tcl7.6/bin/lib -ltcl7.6 -ldl -lm
> > Undefined                       first referenced
> >  symbol                             in file
> > socket                     libtcl7.6.a(tclUnixChan.o)
> > getpeername                libtcl7.6.a(tclUnixChan.o)
> > recv                       libtcl7.6.a(tclUnixChan.o)
> > gethostbyname              libtcl7.6.a(tclUnixChan.o)
> > accept                     libtcl7.6.a(tclUnixChan.o)
> > send                       libtcl7.6.a(tclUnixChan.o)
> > bind                       libtcl7.6.a(tclUnixChan.o)
> > setsockopt                 libtcl7.6.a(tclIOSock.o)
> > getservbyname              libtcl7.6.a(tclIOSock.o)
> > gethostbyaddr              libtcl7.6.a(tclUnixChan.o)
> > getsockopt                 libtcl7.6.a(tclIOSock.o)
> > inet_addr                  libtcl7.6.a(tclUnixChan.o)
> > inet_ntoa                  libtcl7.6.a(tclUnixChan.o)
> > getsockname                libtcl7.6.a(tclUnixChan.o)
> > listen                     libtcl7.6.a(tclUnixChan.o)
> > connect                    libtcl7.6.a(tclUnixChan.o)
> > ld: fatal: Symbol referencing errors. No output written to otclsh
> > *** Error code 1
> > make: Fatal error: Command failed for target `otclsh'
> > 
> > 
> > 
> 
> you need link some more libraries.
> add -lsocket -lnsl before -ldl in your make file, or   
> just do
>  gcc -o otclsh -g -O -I. -I../tcl7.6/generic
>  -I../tk4.2/bin/include -I/usr/local/X11R6/include otclAppInit.c \
>  -L. -lotcl -L../tcl7.6/bin/lib -ltcl7.6 -lsocket -lnsl -ldl -lm
> 
> good luck.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Huayan Amy Wang
> GRA, EE dept, Columbia U.
> Tel: 212-939-7158
> URL: http://www.ctr.columbia.edu/~whycu
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>