vscode中配置或添加頭文件路徑

vscode中配置或添加頭文件路徑

在vscode中按Ctrl+Shift+P 輸入configuration 在c_cpp_properties.json中includePath字段中添加待添加的SDK或者庫的頭文件路徑 例:"/usr/local/xxx/include/"

在這裏插入圖片描述

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "/usr/local/xxx/include/"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

重新打開文件
恩,可以點擊跳轉啦~


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章