From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,ad93a232f2009837,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-02-02 03:06:47 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!surfnet.nl!tudelft.nl!not-for-mail From: Jouk Jansen Newsgroups: comp.unix.tru64 Subject: c++(gcc) & gethostbyname Date: Fri, 02 Feb 2001 12:06:41 +0100 Organization: Nationaal Centrum voor HREM Message-ID: <3A7AA2D0.5FCF4355@hrem.stm.tudelft.nl> NNTP-Posting-Host: dutsm1120.stm.tudelft.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.tudelft.nl 981112006 28197 130.161.241.120 (2 Feb 2001 11:06:46 GMT) X-Complaints-To: usenet@news.tudelft.nl NNTP-Posting-Date: Fri, 2 Feb 2001 11:06:46 +0000 (UTC) X-Mailer: Mozilla 3.03Gold (X11; I; OpenVMS V7.2-1 Digital Personal WorkStation ) Xref: supernews.google.com comp.unix.tru64:1620 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 #include main() { struct hostent* he; he = gethostbyname( "testje" ); } focus-jj)