Mail Archives: cygwin/2000/02/11/19:03:39
------=_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> </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> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Bertrand Dunogier</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>
<HR>
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </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> diffusion.sin_family &n=
bsp; =3D=20
AF_INET;<BR> if(inet_aton(argv[1], =
&diffusion.sin_addr) =3D=3D=20
0) <BR> perror("Conversion =
adresse");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>including that file:</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2> <FONT=20
face=3DTerminal>#include <arpa/inet.h></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and gcc sends back that =
error:</FONT></DIV>
<DIV><FONT face=3DTerminal size=3D2> gcc =20
emetteur.o -o=20
emetteur<BR> emetteur.o(.text+0x195):emetteur.c: =
undefined=20
reference to `inet_aton'<BR> collect2: ld returned 1 =
exit=20
status<BR> make: *** [emetteur] Error=20
1</FONT></DIV></BODY></HTML>
------=_NextPart_000_000B_01BF74F5.DD488470--
- Raw text -