gpt4 book ai didi

c - Microsoft C++ 编译器, fatal error C1083 : Cannot open include file 'stdio.h'

转载 作者:行者123 更新时间:2023-11-30 19:03:16 31 4
gpt4 key购买 nike

我有以下 C 文件。

#include <stdio.h>

我打开 VS 2017 的开发人员命令提示符实例并键入命令。

cl [my-file.c]

我收到以下错误消息

fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory.

我不确定如何解决这个问题。

最佳答案

当前 session 的包含目录存储在 INCLUDE 中环境变量。

您可以通过输入 echo %INCLUDE% 查看此内容在命令提示符下。

要将目录添加到包含路径,请使用命令 set INCLUDE=%INCLUDE%;C:\foo\bar .

事实上,编译器没有找到像 <stdio.h> 这样的标准且普遍存在的 header 。表明您的 Visual Studio 安装存在严重问题。如果我是你,我会运行修复安装。

关于c - Microsoft C++ 编译器, fatal error C1083 : Cannot open include file 'stdio.h' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54184448/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com