VScode header file add path

First use the debug operation to create three (some are four) json files, the specific operation steps can be: click here to reprint

The path to include the header file is mainly two files, one is task.json and c_cpp_properties.json file
Insert picture description here

1 First open the task.json file.
Then find this column,
Insert picture description here

The red font in the bottom line is the path I want to include, which is
modeled on the above format: "
-I ", "file path" 2 and then open the c_cpp_properties.json file
and add the header file path in "includePath",
such as the one added in the picture The path is: "/home/sms/desktop/serial/rm_serial"
Insert picture description here

3Ctrl+F5

Guess you like

Origin blog.csdn.net/Msyusheng/article/details/112258798