From: alex <alexandre.masselot@bigfoot.com>
Subject: Re: gcc and gethostbyname: where is the library
Date: Wed, 03 Jul 2002 09:48:12 +0200 [thread overview]
Message-ID: <pan.2002.07.03.09.48.12.12664.6834@bigfoot.com> (raw)
In-Reply-To: pan.2002.07.02.15.38.43.451953.6834@bigfoot.com
Hi there,
thanks for your help.
With your tip, I could get into the observation that we have 2 netdb.h
files (a dummy one in /usr/local/include and a good one into
/usr/include)
g++ was selecting the bad one by default.
Tahnks for your help
Alex
On Tue, 02 Jul 2002 15:38:44 +0200, alex wrote:
> Hello,
>
> I cannot figure out why gcc cannot link the following file:
>>cat a.cpp
> #include <netdb.h>
> main()
> {
> struct hostent* he;
>
> he = gethostbyname( "testje" );
> }
>
>
>>gcc a.cpp
> /usr/bin/ld:
> Unresolved:
> gethostbyname(char const *)
> collect2: ld returned 1 exit status
>
>>gcc -v
> Reading specs from
> /usr/local/lib/gcc-lib/alphaev6-dec-osf5.1/2.95.3/specs gcc version
> 2.95.3 20010315 (release)
>
> I've also installed gcc 3.0.4, of course without any success.
>
> Can anyone help me
> It would be **greatly** appreciated
>
> Alex
prev parent reply other threads:[~2002-07-03 7:48 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
2002-07-03 7:48 ` alex [this message]
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