From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c86f7555baa8a3af,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-07-02 06:39:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!151.189.0.75!newsfeed.arcor-online.net!news.belwue.de!news.tesion.net!newsfeed-zh.ip-plus.net!news.ip-plus.net!not-for-mail From: alex Newsgroups: comp.unix.tru64 Subject: gcc and gethostbyname: where is the library Date: Tue, 02 Jul 2002 15:38:44 +0200 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: NNTP-Posting-Host: 194.209.13.177 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: rex.ip-plus.net 1025617143 6582 194.209.13.177 (2 Jul 2002 13:39:03 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Tue, 2 Jul 2002 13:39:03 +0000 (UTC) User-Agent: Pan/0.11.2 (Unix) X-Comment-To: ALL Xref: archiver1.google.com comp.unix.tru64:8032 Hello, I cannot figure out why gcc cannot link the following file: >cat a.cpp #include 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