This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Undefined reference to 'gethostent'


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 cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]