Fatal error: sys / socket.h: no such file or directory, x86_64-w64-mingw32 mode

I am trying to develop a program that depends on the socket library, as soon as I try to do this it will prompt me:

fatal error: sys/socket.h: No such file or directory
 #include <sys/socket.h>

      

My build environment: Windows 8.1 on Cygwin x64 version, Create target: x86_64-w64-mingw32 as parameters -host = x86_64-w64-mingw32.

Command line: cfalgs = -m64./configure --prefix = / usr /

I am creating an application that uses GTK + 2.0.

I'm trying to find find in socket.h file under patch: cygwin64 \ usr \ x86_64-w64-mingw32 \ sys-root \ mingw \ include \ sys. Doesn't seem to exist at all.

So there is no x64 version of MinGW socket lib ??

+3


source to share


1 answer


sys/socket.h

- POSIX / SUS header. MinGW is designed to create WinAPI executable files. Either switch to build with Cygwin GCC to access POSIX / SUS tools, or switch to using WinAPI winsock2.h

.



+2


source







All Articles