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