VS compiles C++ error C1083 cannot open include file: "unistd.h": No such file or directory

Create a .h file named unistd.h with the content:

/** This file is part of the Mingw32 package.
unistd.h maps (roughly) to io.h
*/
#ifndef _UNISTD_H
#define _UNISTD_H
#include <io.h>
#include <process.h>
#endif /* _UNISTD_H */

Stored in the VS installation directory: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include folder

Guess you like

Origin blog.csdn.net/Cecidit_824/article/details/126798459