public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Why Cygwin tries to pull in winsock2.h when compiling a Linux application?
@ 2012-06-30  7:41 Patrick L
  2012-06-30  7:54 ` marco atzeri
  2012-06-30  9:43 ` Csaba Raduly
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick L @ 2012-06-30  7:41 UTC (permalink / raw)
  To: cygwin

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
configure: WARNING: winsock2.h:     check for missing prerequisite headers?
configure: WARNING: winsock2.h: see the Autoconf documentation
configure: WARNING: winsock2.h:     section "Present But Cannot Be Compiled"
configure: WARNING: winsock2.h: proceeding with the preprocessor's result
configure: WARNING: winsock2.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to xxx@xxx.xxx ##
configure: WARNING:     ## ------------------------------------------ ##
checking for winsock2.h... yes
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... yes
configure: WARNING: ws2tcpip.h: present but cannot be compiled
configure: WARNING: ws2tcpip.h:     check for missing prerequisite headers?
configure: WARNING: ws2tcpip.h: see the Autoconf documentation
configure: WARNING: ws2tcpip.h:     section "Present But Cannot Be Compiled"
configure: WARNING: ws2tcpip.h: proceeding with the preprocessor's result
configure: WARNING: ws2tcpip.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to xxx@xxx.xxx ##
configure: WARNING:     ## ------------------------------------------ ##
checking for ws2tcpip.h... yes

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? How can I fix this issue?

Thanks.


--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why Cygwin tries to pull in winsock2.h when compiling a Linux application?
  2012-06-30  7:41 Why Cygwin tries to pull in winsock2.h when compiling a Linux application? Patrick L
@ 2012-06-30  7:54 ` marco atzeri
  2012-06-30  9:43 ` Csaba Raduly
  1 sibling, 0 replies; 3+ messages in thread
From: marco atzeri @ 2012-06-30  7:54 UTC (permalink / raw)
  To: cygwin

On 6/30/2012 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

If this program is looking for winsock2.h than it allows to be
compiled on windows.
It is not cygwin requesting it, it is the configure itself

> configure: WARNING: winsock2.h: present but cannot be compiled
> configure: WARNING: winsock2.h:     check for missing prerequisite headers?
> configure: WARNING: winsock2.h: see the Autoconf documentation
> configure: WARNING: winsock2.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: winsock2.h: proceeding with the preprocessor's result
> configure: WARNING: winsock2.h: in the future, the compiler will take precedence
> configure: WARNING:     ## ------------------------------------------ ##
> configure: WARNING:     ## Report this to xxx@xxx.xxx ##
> configure: WARNING:     ## ------------------------------------------ ##
> checking for winsock2.h... yes
> checking ws2tcpip.h usability... no
> checking ws2tcpip.h presence... yes
> configure: WARNING: ws2tcpip.h: present but cannot be compiled
> configure: WARNING: ws2tcpip.h:     check for missing prerequisite headers?
> configure: WARNING: ws2tcpip.h: see the Autoconf documentation
> configure: WARNING: ws2tcpip.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: ws2tcpip.h: proceeding with the preprocessor's result
> configure: WARNING: ws2tcpip.h: in the future, the compiler will take precedence
> configure: WARNING:     ## ------------------------------------------ ##
> configure: WARNING:     ## Report this to xxx@xxx.xxx ##
> configure: WARNING:     ## ------------------------------------------ ##
> checking for ws2tcpip.h... yes
>
> 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? How can I fix this issue?
>
> Thanks.

Which program ?






--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why Cygwin tries to pull in winsock2.h when compiling a Linux application?
  2012-06-30  7:41 Why Cygwin tries to pull in winsock2.h when compiling a Linux application? Patrick L
  2012-06-30  7:54 ` marco atzeri
@ 2012-06-30  9:43 ` Csaba Raduly
  1 sibling, 0 replies; 3+ messages in thread
From: Csaba Raduly @ 2012-06-30  9:43 UTC (permalink / raw)
  To: Patrick L, cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-30  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30  7:41 Why Cygwin tries to pull in winsock2.h when compiling a Linux application? Patrick L
2012-06-30  7:54 ` marco atzeri
2012-06-30  9:43 ` Csaba Raduly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).