Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <000e01bf74ed$7be77220$fb6ba13e@mephisto> From: "Bertrand Dunogier" To: Subject: B20.1: gcc, undefined reference to `inet_aton' Date: Sat, 12 Feb 2000 01:09:51 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01BF74F5.DD488470" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 ------=_NextPart_000_000B_01BF74F5.DD488470 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =3D AF_INET; if(inet_aton(argv[1], &diffusion.sin_addr) =3D=3D 0)=20 perror("Conversion adresse"); including that file: #include 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 ------=_NextPart_000_000B_01BF74F5.DD488470 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
OS: Windows 2000
cygwin version: Cygwin = b20.1
gcc version:=20 gcc-2.95.2-for.Cygwin-20.1
 
Hello,
i ever get that error when trying to = build a C code=20 program. I've checked inside the included file arpa/inet.h, and the = declaration=20 of the function looks ok. I've tested the inet_ntoa function, and it = works=20 properly. Looks like there's a problem with inet_aton...
Could you tell me if such a bug has = been reported?=20 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=20 code
   diffusion.sin_family    &n= bsp; =3D=20 AF_INET;
   if(inet_aton(argv[1], = &diffusion.sin_addr) =3D=3D=20 0) 
       perror("Conversion = adresse");
including that file:
      #include <arpa/inet.h>
and gcc sends back that = error:
   gcc  =20 emetteur.o   -o=20 emetteur
   emetteur.o(.text+0x195):emetteur.c: = undefined=20 reference to `inet_aton'
   collect2: ld returned 1 = exit=20 status
   make: *** [emetteur] Error=20 1
------=_NextPart_000_000B_01BF74F5.DD488470--