From: Atlant Schmidt <atlantnospam@mindspring.com>
Subject: Re: gcc and gethostbyname: where is the library
Date: Tue, 02 Jul 2002 13:09:58 -0400 [thread overview]
Message-ID: <3D21DE66.EF7AECD2@mindspring.com> (raw)
In-Reply-To: m3heji6v8k.fsf@salmon.parasoft.com
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.
Atlant
next prev parent reply other threads:[~2002-07-02 17:09 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 [this message]
2002-07-03 5:05 ` Paul Pluzhnikov
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