Я выполнил шаги, упомянутые здесь .
Я получаю ошибку #, включая обнаруженные ошибки. Пожалуйста, обновите ваш includePath в строке, где я #include или # include
Я обнаружил аналогичную проблему StackOverflow здесь , но ничего не помогло.
Я нашел this Проблема Github подана и прошла через нее, но это не помогло.
Я проверил, что на моем Mac установлен clang. Он присутствует в местоположении /usr/bin
. Я также проверил, что заголовочные файлы, такие как алгоритм, iostream, stdc ++, присутствуют в /usr/local/Cellar/gcc/7.1.0/include/c++/7.1.0
Как решить эту проблему?
Вот мои файлы конфигурации:
c_cpp_properties.json:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/Cellar/gcc/7.1.0/include/c++/7.1.0"
],
"defines": [],
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
],
"version": 4
}
tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build with Clang",
"type": "shell",
"command": "clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
"test.cpp",
"-o",
"test.out",
"--debug"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/test",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb",
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true
}
}
]
}
settings.json:
{
"files.associations": {
"valarray": "cpp",
"ios": "cpp",
"random": "cpp",
"__locale": "cpp",
"__string": "cpp",
"regex": "cpp",
"string": "cpp",
"string_view": "cpp",
"utility": "cpp",
"iosfwd": "cpp",
"chrono": "cpp",
"complex": "cpp",
"__bit_reference": "cpp",
"__hash_table": "cpp",
"__split_buffer": "cpp",
"__tree": "cpp",
"array": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"initializer_list": "cpp",
"iterator": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"algorithm": "cpp",
"limits": "cpp",
"__config": "cpp",
"__nullptr": "cpp",
"cstddef": "cpp",
"exception": "cpp",
"stdexcept": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"condition_variable": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"functional": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"ratio": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"fstream": "cpp",
"future": "cpp",
"iomanip": "cpp",
"iostream": "cpp",
"istream": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"scoped_allocator": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"queue": "cpp",
"stack": "cpp",
"__functional_03": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__functional_base": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__threading_support": "cpp",
"__tuple": "cpp",
"any": "cpp",
"charconv": "cpp",
"locale": "cpp",
"span": "cpp",
"variant": "cpp",
"filesystem": "cpp"
}
}