VS2008 Missing C/C++ Header Files

So, I'm working on some network programming in C, and it would seem that I am missing a bunch of standard C/C++ header files. For example, sys/socket.h is not there. A few otheres are missing too like netdb.h, and unistd.h. Is there a pack I need to install to get these on windows?



All these headers are from POSIX, not ANSI C, or ISO C++. You won't find them in Windows without installing some sort of compatibility layer, like Cygwin, or porting your application to Windows API, or use some macros and wrappers to map similar functions (i.e. #define strtok_r strtok_s).

none of those are standard c or c++ headers. On windows, socket definitions are in winsock2.h

you probably won't find it because it is a commonly used linux header file. You can find it in linux-libc-dev, if you really want it.

As others said, you're using the POSIX headers and definitions for Socket. Check out MSDN for the headers and structures that are defined on Windows: http://msdn.microsoft.com/en-us/library/ms740506.aspx. The calls are pretty much the same, but this will give you all the microsoft-specific syntax.

Need Your Help

Can CodeIgniter route to different controllers based on port number?

php codeigniter port codeigniter-url codeigniter-routing

I would like to have CodeIgniter route to a different controller based on port number like so:

Disabling backbutton of browser in C#

c# asp.net

<script type="text/javascript">