| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,J_CHICKENPOX_43,SPF_HELO_PASS,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <24221636.post@talk.nabble.com> |
| Date: | Fri, 26 Jun 2009 07:47:12 -0700 (PDT) |
| From: | lrc <richard DOT carey AT uk DOT logicalis DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Cygwin and C socket |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |