• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

VS代码配置C语言环境-无法打开源文件stdio.h的解决方案


Recommended Posts

1.安装后,安装C/C插件。

3bgahmymdv04830.png

2.安装MinGW(Windows版极简GNU)

下载地址:https://sourceforge.net/projects/mingw-w64/files/

重点:下载x86_64-posix-seh

-电脑系统是64位的,所以我选择了x86_64。

-开发Windows程序需要win32,开发Linux、Unix、Mac OS等操作系统下的程序需要posix。

-如果您之前选择了64位,那么这里有两个异常处理模型供您选择。seh是新发明,sjlj老了。Seh性能不错,但是不支持32位。Sjlj稳定性好,支持32位。

操作:我这里选了seh。

jsj0lzrxeuk4831.png

具体配置说明参考:

https://zhuanlan.zhihu.com/p/76613134

3.写了一个C语言后,提示:无法打开源文件stdio.h

在看了很多教程后,发现需要添加环境变量include path,

重点来了,需要添加的是:C:\Users\User\Documents\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\x86_64-w64-mingw32\includ

而不是其他的include,其他文件夹里的include,其他的添加了仍然报错!!!

okzdhf11umi4832.png

将上述路径添加到:C/C扩展设置:

odmbo1ifdn24833.png

不,这是错的

Link to comment
Share on other sites