c++ - 尝试运行 c++ 文件,但它说 launch.json 需要更新其包含路径
问题描述
尝试在 C++ 中运行一个简单的 hello world 程序,如下所示
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}
但是,它给了我错误:#include 检测到错误。请更新您的includePath
. 此翻译单元已禁用 Squiggles
我去了它引导我到的 Json 文件,我显示了这个
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "cl",
"args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/path/to/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
我对下一步该怎么做感到困惑,如果有人可以提供帮助,将不胜感激
解决方案
推荐阅读
- powershell - 用于复制上传的 json 文件并放入 dynamodb 表的 powershell 脚本
- javascript - 在回调函数中优雅地检测事件对象的存在(和类型)或不存在
- amp-html - 如何在 AMP 中为印度用户管理 Geo Cty
- python - InvalidArgumentError: Conv2DCustomBackpropFilterOp 仅支持 NHWC - 修剪神经网络
- javascript - React Home 容器没有覆盖整个屏幕
- angularjs - angularjs登录中的类型错误不是函数
- scala - Akka 投影测试总是失败
- git - git - 如果没有其他分支,如何删除本地 master
- autodesk-forge - Autodesk forge 转换扩展打开/关闭 X、Y、Z 轴
- node.js - 如何使用 Traefik 让外部服务接受来自 Docker 中的内部服务的请求