Hi all,
i created a dev-c++ C project in vista. While compiling it says sys/socket.h,
netdb.h files are missing. where i can download and include these header
files. i dont want to use windows header files.
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Having the header files alone will not help; you will still need a library to
link to, and they do not exist on Windows. These headers are for BSD socket
API, but you are developing in Windows which uses the WinSock API. WinSock is
based on BSD and porting between then is relatively straightforward. See here: http://msdn.microsoft.com/en-
us/library/ms740096%28VS.85%29.aspx. It would be trivial to create a wrapper
that would make winsock look like BSD.
If you really must use BSD sockets on Windows, you will have to use Cygwin,
which is a sledgehammer to crack a nut, and will probably cause more problems
than it solves unless you have a really large code base to port and are
willing to suffer the pain of deploying such applications.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
i created a dev-c++ C project in vista. While compiling it says sys/socket.h,
netdb.h files are missing. where i can download and include these header
files. i dont want to use windows header files.
thanks
Having the header files alone will not help; you will still need a library to
link to, and they do not exist on Windows. These headers are for BSD socket
API, but you are developing in Windows which uses the WinSock API. WinSock is
based on BSD and porting between then is relatively straightforward. See here:
http://msdn.microsoft.com/en-
us/library/ms740096%28VS.85%29.aspx. It would be trivial to create a wrapper
that would make winsock look like BSD.
If you really must use BSD sockets on Windows, you will have to use Cygwin,
which is a sledgehammer to crack a nut, and will probably cause more problems
than it solves unless you have a really large code base to port and are
willing to suffer the pain of deploying such applications.