From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4209 invoked by alias); 30 Jun 2012 09:43:32 -0000 Received: (qmail 4198 invoked by uid 22791); 30 Jun 2012 09:43:31 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 Jun 2012 09:43:18 +0000 Received: by vcbgb30 with SMTP id gb30so3094983vcb.2 for ; Sat, 30 Jun 2012 02:43:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.73.105 with SMTP id k9mr2218041vdv.72.1341049397986; Sat, 30 Jun 2012 02:43:17 -0700 (PDT) Received: by 10.52.31.33 with HTTP; Sat, 30 Jun 2012 02:43:17 -0700 (PDT) In-Reply-To: <1341042078.16411.YahooMailNeo@web121706.mail.ne1.yahoo.com> References: <1341042078.16411.YahooMailNeo@web121706.mail.ne1.yahoo.com> Date: Sat, 30 Jun 2012 09:43:00 -0000 Message-ID: Subject: Re: Why Cygwin tries to pull in winsock2.h when compiling a Linux application? From: Csaba Raduly To: Patrick L , cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00572.txt.bz2 Hi Patrick On Sat, Jun 30, 2012 at 9:41 AM, Patrick L wrote: > Hi, I am using Cygwin 1.7.11 i686 on Windows 7 PC. I am trying to compile a Linux C++ application on Cygwin. > > When I use the ./configure command, Cygwin shows the following error messages: > > checking winsock2.h usability... no > checking winsock2.h presence... yes > configure: WARNING: winsock2.h: present but cannot be compiled (snip) > winsock2.h and ws2tcpip.h are Windows header files for Windows network/socket programming. Why Cygwin tries to pull in Windows header files when I am compiling a Linux C++ application? Because the configure script is trying to find them. I suspect this is a program (or its configure script) which "thinks" that Cygwin is Windows. (It appears to be testing explicitly for winsock2.h; it shouldn't) > How can I fix this issue? Tell the authors of the program that Cygwin is not Windows. Take a look at config.log; it should contain the error message from the compiler when it tried to use winsock2.h Search for checking winsock2.h usability in config.log; there should be a short C source, a gcc invocation and an error message. Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- 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