VSCode使用小结

郭翰墨
2023-12-01

vscode是一款编辑器,而不是IDE

c/c++

.vscode目录下有4个文件,它们分别是c_cpp_properties.json,*.code-workspace,settings.json,tasks.json。c_cpp_proerties.json里配置的includePath,只是在编辑代码时提供智能提示的帮助,而编译时如果要配置includepath,应该是tasks.json里配置。
includePath in c_cpp_properties.json not working in VSCode for C

The c_cpp_properties.json controls, among other things, where intellisense in the IDE resolves include files. The IDE and the build tasks are independent things and as a result, configured and operate independently in VS Code.
The solution to your problem is to add the include path to your tasks.json file, as follows:

"args": [
        
 类似资料: