Cygwin and C socket
lrc
richard.carey@uk.logicalis.com
Fri Jun 26 14:55:00 GMT 2009
Hello, I am trying to build a PoC around calling a RESTFul service from a C
program. I have installed the eclipse CDT and Cygwin and can build and run a
hello world C exe.
The next test is to use the socket stuff to connect to a URL, however whe I
try to compile my code (taken from another site) I get an error that the
compiler does not know the size of an object. I can not finr the addrinfo
struct in any of the include below. Is there a specific package I need to
install to make this work?
Thanks
the code in question:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
int main(int argc, char *argv[]) {
struct addrinfo hints, *res, *p;
......
if ((status = getaddrinfo(argv[1], NULL, &hints, &res)) != 0) {
--
View this message in context: http://www.nabble.com/Cygwin-and-C-socket-tp24221636p24221636.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list