delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/11/19:03:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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" <bertrand-dunogier AT wanadoo DOT fr>
To: <cygwin AT sourceware DOT cygnus DOT com>
Subject: B20.1: gcc, undefined reference to `inet_aton'
Date: Sat, 12 Feb 2000 01:09:51 +0100
MIME-Version: 1.0
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 <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

------=_NextPart_000_000B_01BF74F5.DD488470
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><U>OS:</U> Windows 2000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><U>cygwin version:</U> Cygwin =
b20.1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><U>gcc version:</U>=20
gcc-2.95.2-for.Cygwin-20.1</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>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...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Could you tell me if such a bug has =
been reported?=20
or if there is a way to fix it...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Bertrand Dunogier</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<HR>
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV>
<DIV>P.S.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>we call the function in that piece of=20
code</FONT></DIV>
<DIV><FONT face=3DTerminal=20
size=3D2>&nbsp;&nbsp;&nbsp;diffusion.sin_family&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; =3D=20
AF_INET;<BR>&nbsp;&nbsp;&nbsp;if(inet_aton(argv[1], =
&amp;diffusion.sin_addr) =3D=3D=20
0)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perror("Conversion =

adresse");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>including that file:</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT=20
face=3DTerminal>#include &lt;arpa/inet.h&gt;</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and gcc sends back that =
error:</FONT></DIV>
<DIV><FONT face=3DTerminal size=3D2>&nbsp;&nbsp;&nbsp;gcc&nbsp;&nbsp;=20
emetteur.o&nbsp;&nbsp; -o=20
emetteur<BR>&nbsp;&nbsp;&nbsp;emetteur.o(.text+0x195):emetteur.c: =
undefined=20
reference to `inet_aton'<BR>&nbsp;&nbsp;&nbsp;collect2: ld returned 1 =
exit=20
status<BR>&nbsp;&nbsp;&nbsp;make: *** [emetteur] Error=20
1</FONT></DIV></BODY></HTML>

------=_NextPart_000_000B_01BF74F5.DD488470--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019