我尝试这样设置c_cpp_properties.json
(我在LLVM文档中合并了标题)
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"H:\\LLVM\\include/**",
"H:\\LLVM\\x86_64-w64-mingw32\\include/**",
"H:\\mingw-w64\\mingw64\\include/**",
"H:\\mingw-w64\\mingw64\\x86_64-w64-mingw32/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "H:/LLVM/bin/clang.exe",
"cStandard": "c11",
"cppStandard": "gnu++14",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
但是在检测到它时总是出现错误信息>
#include <iostream> #include <string> #include <locale> detect #include error. please update the includePath
但是,当我将编译器更改为gcc.exe或g ++。exe时,>>
或删除c_cpp_properties.json然后它可以工作。
我尝试删除c_cpp_properties.json,C / C ++工具会自动更改
编译到gcc.exe,然后它也可以工作。
我的操作系统是Windows 10
[LLVM和MinGW-w64是最新的
感谢您的帮助。
我尝试这样设置c_cpp_properties.json(我已经在LLVM文档中合并了标题){“配置”:[{“名称”:“ Win32”,“ ...
我发现LLVM文档具有clang-cpp.exe,
如果我用它来编译c ++程序,它将运行正确,