解决vscode cmake提示检测到 #include 错误

一、问题

cmake已经包含了动态库文件,依然提示"检测到 #include 错误。请更新 includePath。"

二、解决方案

Ctrl Shift P进入CPP编辑配置,然后在JSON中加入下面一行:
"configurationProvider": "ms-vscode.cmake-tools",

json 复制代码
{
    "configurations": [
        {
            "configurationProvider": "ms-vscode.cmake-tools",
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "linux-gcc-x64",
        }
    ],
    "version": 4
}

重启vscode即可。

相关推荐
baidu_1720125340 分钟前
在Visual Studio中安装通义灵码
ide·visual studio
foxsen_xia2 小时前
Go安装、配置和vsCode配置Go
开发语言·vscode·golang
黎相思4 小时前
环境搭建
ide
晨同学03274 小时前
【亲测可行】windows安装visual studio & opencv4.10.0
ide·windows·visual studio
PWRJOY5 小时前
Android Studio中安卓模拟器打不开,报错The emulator process for AVD has terminated
android·ide·android studio
金融小师妹5 小时前
基于LSTM趋势预测的白银价格突破58美元阈值,年度累计涨幅超100%的强化学习驱动分析
大数据·人工智能·编辑器·1024程序员节
UVM_ERROR9 小时前
硅农VSCode 插件推荐
vscode·centos·ssh
BD_Marathon10 小时前
【IDEA】IDEA的详细设置
java·ide·intellij-idea
x***440110 小时前
vscode配置django环境并创建django项目(全图文操作)
vscode·django·sqlite
帮帮志11 小时前
Jupyter使用的快捷键大全
ide·python·jupyter