Question : Visual studio code include path not working c++
Answered by : almafa64
// task.json
// add this line (with your path) '"-Ipath/to/my/include/files",' to first line in "args"[]
// example:
{ "version": "2.0.0" "tasks": [ { //... "args": [ "-I${workspaceFolder}\\Headers", "-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], //... "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "Task generated by Debugger." } ],
}
Source : https://stackoverflow.com/questions/57458423/vscode-not-recognizing-includes-from-includepath | Last Update : Mon, 06 Sep 21