I’m trying to compile my client server program with MingW32, but I’m getting the error:
no sys/socket.h
So the compilation was terminated.
How can I solve this problem?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That file does not exist on Windows – to use networking sockets, you’ll have to use Winsock. Fortunately, it’s very similar to UNIX’s Berkeley sockets.
If it saves you any time, I’ve written a thin socket wrapper that compiles on both Windows and *nix systems. You can find it here.