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]

B20.1: gcc, undefined reference to `inet_aton'


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

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