Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Mark Garrett <Mark.Garrett@wedontwantyourspam.com.au>
Subject: Re: c++(gcc) & gethostbyname
Date: Sat, 03 Feb 2001 10:48:45 GMT	[thread overview]
Message-ID: <B6A22947.113FB%Mark.Garrett@wedontwantyourspam.com.au> (raw)
In-Reply-To: 3A7AA2D0.5FCF4355@hrem.stm.tudelft.nl

in article 3A7AA2D0.5FCF4355@hrem.stm.tudelft.nl, Jouk Jansen at
joukj@hrem.stm.tudelft.nl wrote on 02/02/2001 22:06:

> Hi all,
> 
> Is it a known problem that c++(gcc) cannot include gethostbyname?
> gcc, and Compaq's cc and cxx seem to work well (see example below)
> 
> Jouk
> 
> 
> 
> 
> focus-jj) cc test.c
> focus-jj) gcc test.c
> focus-jj) ren test.c test.cpp
> focus-jj) c++ test.cpp
> /usr/ucb/ld:
> Unresolved:
> gethostbyname(char const *)
> collect2: ld returned 1 exit status
> focus-jj) cxx test.cpp
> cat test.cpp

Looks like your gcc is screwed up - it works for me :-

root@ned> cc -V
Compaq C V6.3-027 on Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-026 (sys) cc Driver
root@ned> cxx -V
Compaq C++ V6.3-003 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-003 (cxx) cxx Driver
root@ned> gcc --version
2.8.1
root@ned> cat test.c
#include <netdb.h>
main()
{
   struct hostent* he;

   he = gethostbyname( "testje" );
}
root@ned> cc test.c
root@ned> gcc test.c
root@ned> mv test.c test.cpp
root@ned> gcc test.cpp


    Cheers
        Mark ;)



  reply	other threads:[~2001-02-03 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-02 11:06 c++(gcc) & gethostbyname Jouk Jansen
2001-02-03 10:48 ` Mark Garrett [this message]
2001-02-03 18:21 ` Dan Riley
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