B20.1: gcc, undefined reference to `inet_aton'
Bertrand Dunogier
bertrand-dunogier@wanadoo.fr
Fri Feb 11 16:10:00 GMT 2000
OS: Windows 2000
cygwin version: Cygwin b20.1
gcc version:
gcc-2.95.2-for.Cygwin-20.1
ÃÂ
Hello,
i ever get that error when trying to build a C code
program. I've checked inside the included file arpa/inet.h, and the declaration
of the function looks ok. I've tested the inet_ntoa function, and it works
properly. Looks like there's a problem with inet_aton...
Could you tell me if such a bug has been reported?
or if there is a way to fix it...
ÃÂ
Thanks for your help
ÃÂ
Bertrand Dunogier
ÃÂ
ÃÂ
P.S.
we call the function in that piece of
code
ÃÂ ÃÂ ÃÂ diffusion.sin_familyÃÂ ÃÂ ÃÂ ÃÂ ÃÂ =
AF_INET; ÃÂ ÃÂ ÃÂ if(inet_aton(argv[1], &diffusion.sin_addr) ==
0)ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ perror("Conversion
adresse");
including that file:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ #include <arpa/inet.h>
and gcc sends back that error:
ÃÂ ÃÂ ÃÂ gccÃÂ ÃÂ
emetteur.oÃÂ ÃÂ -o
emetteur ÃÂ ÃÂ ÃÂ emetteur.o(.text+0x195):emetteur.c: undefined
reference to `inet_aton' ÃÂ ÃÂ ÃÂ collect2: ld returned 1 exit
status ÃÂ ÃÂ ÃÂ make: *** [emetteur] Error
1
More information about the Cygwin
mailing list