Subject: Undefined reference to 'gethostent'
From: Matthew Golzari <[email-masked]>
To: [email-masked]
Date: Mon, 24 May 1999 00:29:38 +0200

Dear reader,

During linking the next line:
$ gcc -o test test.o

I get the following error message:
test.o(.text+0x387):test.c: undefined reference to 'gethostent'
collect2: Id returned 1 exit status

Some of source-code:

#include <netdb.h>
.
int main(void)
.
       struct hostent *host;
.
        host = gethostent();
.

I've tried the following tricks:
extern struct hostent *gethostent(void);

and during linking the next option:
-L"all of the libraries !!!"

No result,

Is there anyone with any solution ?

Best regards,

M. Golzari

--
Want to unsubscribe from this list?
Send a message to [email-masked]