I am compiling the code in Visual Studio 2010
which includes header file unistd.h
. Since windows does not have any support for the header file unistd.h
, I am looking for the alternative header file or is there any way to customize it so that I can compile it in Visual Studio as well.
Try include io.h, it's equivalent of unistd.h in MSVC. if you want to maintain the compatibility, try this:
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With