Web lists-archives.org

Re: [Mingw-users] undefined reference to `inet_aton' in WIndows/mingw







>
>
> I'm porting a simple Unix program, that uses sockets, to Windows with the use
> of wingw gcc.
>
> I'm getting a linker error "undefined reference to `inet_aton'" when I
> compile my program:
>
> \mingw\bin\gcc -o ir2diskc ir2diskc.c -lsw2_32
>
> Do I need to link with some other library in addition to sw2_32 or is
> inet_aton() simply not available in Windows?

Windows Sockets are not exactly the same as Berkeley Sockets.

> If it is the latter how do you convert an address to binary in Windows?
>

Try the Windows Sockets 2 documentation in MSDN at:
http://msdn2.microsoft.com/en-gb/library/ms740673.aspx
_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users