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 To: cygwin AT cygwin DOT com Subject: Cygwin and C socket MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 #include #include #include 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