zoukankan      html  css  js  c++  java
  • windows下VS 无法打开源文件 unistd.h

    许多在Linux下开发的C程序都需要头文件unistd.h,但VC中没有个头文件,所以用VC编译总是报错。把下面的内容保存为unistd.h,放在visual stdio头文件路径下,可以解决这个问题。

    我的路径是:C:Program Files (x86)Microsoft VisualStudio2017CommunityVCToolsMSVC14.16.27023include

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

    由字面意思,unistd.h是unix std的意思,是POSIX标准定义的unix类系统定义符号常量的头文件,包含了许多UNIX系统服务的函数原型,例如read函数、write函数和getpid函数。unistd.h在unix中类似于window中的windows.h。

    天上我才必有用,千金散尽还复来!
  • 相关阅读:
    HTML的<head>中的内容总结
    毕业设计
    win7中protel99添加元件库
    E题
    D 题
    C 题 KMP中next[]问题
    B题 Sort the Array
    A题
    CSU1350 To Add which?
    CodeForce 448C 木片填涂问题
  • 原文地址:https://www.cnblogs.com/lutaishi/p/13436265.html
Copyright © 2011-2022 走看看