Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@earthlink.net>
Subject: Re: gcc and gethostbyname: where is the library
Date: Wed, 03 Jul 2002 05:05:52 GMT	[thread overview]
Message-ID: <m3n0t9tn7q.fsf@salmon.parasoft.com> (raw)
In-Reply-To: 3D21DE66.EF7AECD2@mindspring.com

Atlant Schmidt <atlantnospam@mindspring.com> writes:

> Paul Pluzhnikov wrote:
> 
> > alex <alexandre.masselot@bigfoot.com> writes:
> >
> > > I cannot figure out why gcc cannot link the following file:
> > > >cat a.cpp
> > ...
> > > /usr/bin/ld:
> > > Unresolved:
> > > gethostbyname(char const *)
> >
> > What this means is that 'gethostbyname' has aquired C++ linkage,
> > and the linker is now looking for gethostbyname__FPCc (which
> > is not there).
> 
> I mustn't understand the question/answer [:-)] because I
> would have suggested:
> 
>   % gcc a.cpp -lnsl
> 
> so that libnsl gets linked in. At least on Solaris, that's
> where gethostbyname() lives.

But the question was about Tru64, where:

  $ nm /shlib/libc.so | grep gethostbyname
    __gethostbyname                  | 0004395899947296 | T | 0000000000000008
    __gethostbyname_local            | 0004395900375248 | T | 0000000000000008
    __gethostbyname_r                | 0004395900385184 | T | 0000000000000008
    gethostbyname                    | 0004395899947296 | T | 0000000000000008
    gethostbyname_local              | 0004395900375248 | T | 0000000000000008
    gethostbyname_r                  | 0004395900385184 | T | 0000000000000008

and libnsl.{a,so} does not exist (at least not in any of the default
directories).

Cheers,
-- 
In order to understand recursion you must first understand recursion.


  reply	other threads:[~2002-07-03  5:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-02 13:38 gcc and gethostbyname: where is the library alex
2002-07-02 14:49 ` Paul Pluzhnikov
2002-07-02 17:09   ` Atlant Schmidt
2002-07-03  5:05     ` Paul Pluzhnikov [this message]
2002-07-03  7:48 ` alex
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox