1.遇到错误:
VSCode No such file or directory when running c++ code
"FreeRTOS.h: No such file or directory",
可是这个文件明明在c_cpp_properties.json文件中配置了。
在stackoverflow中找到类似答案:是tasks.json与c_cpp_properties.json文件没分清:
This question was a result of confusion between the tasks.json and the c_cpp_properties.json files. I was treating c_cpp_properties.json as though it was used for compilation.
c_cpp_properties.json is used with Intellisense and in no way deals with compilation.
tasks.json is used for compilation. If you're unfamiliar with tasks.json as I was you need to specify the include paths here as well.
In the args section of your tasks.json use "-I" to add an include path, followed by the path you wish to include.
For my problem that command looked like this:
"-I", "C:\Users\Dill\Desktop\temp\header"
于是在tasks.json中补充加入FreeRTOS.h所在路径:
成功