Link Errors with Net Functions

Jim Balter jqb@netcom.com
Wed Mar 12 03:58:00 GMT 1997


Sergey Okhapkin wrote:
> 
> Michael Godfrey wrote:
> > I'm having trouble linking with the htons(), htonl(), ntohs(), and
> > ntohl() host to/from network byte order functions.
> 
> Did You include <arpa/inet.h>?

<arpa/inet.h> includes  <netinet.h/in.h> which includes <cygwin32/in.h>
which includes <asm/byteorder.h> which defines htonl etc.,
but none of those include files manage to enclose the definition
in extern "C" { ... }.  Bugga bugga bugga.

Michael, try

extern "C" {
#include <arpa/inet.h>
}

--
<J Q B>
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list