在使用VSCode编写C程序时,出现错误:cannot open source file "stdio.h"

配置好MinGW-W64和LLVM的环境变量后,在VSCode下载了C/C++插件,也重启了VSCode,但是编写的测试程序还是报错:

#include<stdio.h>
int main(){
    printf("helo world\n");
    return 0;
}

将鼠标放上去发现错误,然后将鼠标移开后发现有一个黄色的灯,将鼠标在移到小黄灯上,然后点击第一个Edit"includePath" setting。

点击输入框的右侧下拉选,选中末尾是gcc.exe。然后重新运行测试程序。

 

发布了47 篇原创文章 · 获赞 17 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_42428264/article/details/102458722