#include <iostream> 在 Visual Studio Code with mingw64 中找不到



我在Win 10上的"Visual Studio Code"中安装了"C/C++IntelliSense、调试和代码浏览"扩展,并添加了C_cpp_properties.json

{
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"E:\PROGRAMS\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\x86_64-w64-mingw32\include\**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "E:\PROGRAMS\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64",
"compilerArgs": [
"-j"
]
}
],
"version": 4
}

C标头和编译器/调试器的includepath。两者都正常工作,但Intellisense显示

#include "head1.h"
#include <stdlib.h>
#include <stdio.h>
#include <iostream> -> wavelines
int main() {
printf("Hello Worldn");
}

对于iostream,总是使用带有"源无法打开"的波线。现在,我正在寻找将所有C和C++标头放置在x86_64-8.1.0-posix-seh-rt_v6-rev0中的路径。如果我在搜索stdlib.h,我会得到三个可能的路径,iostream到底保存在哪里?Thxs。。。

刚刚找到了一种方法。完全卸载C/C++扩展,包括刷新和重新启动Visual Studio代码,然后在没有任何includepath的情况下新建tasks.json和launch.json文件。

相关内容

最新更新