vs19找不到linux的头文件unistd.h

  • 创建一个unistd.h
    • 将该.h文件放在vs19编译器的inlcude中

创建一个unistd.h

内容如下:

/** 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 */

将该.h文件放在vs19编译器的inlcude中

我的位置:D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include

你们自己找到你们对应的安装位置即可,然后在vs19上找到生成,清除解决方案,然后重新生成一次,接下来#inlcude<unistd.h>
ctrl单击进入头文件,能进入说明可以了。

更多推荐

vs19下无法找到unistd.h头文件