iar icon indicating copy to clipboard operation
iar copied to clipboard

IAR system include path should be place at the end of includePath in c_cpp_properties.json

Open ustbshen opened this issue 4 years ago • 0 comments

As the IAR official development guide description:

If the compiler encounters the name of an #include file in angle brackets, such as: #include <stdio.h> it searches these directories for the file to include: 1 The directories specified with the -I option, in the order that they were specified, see -I, page 282. 2 The directories specified using the C_INCLUDE environment variable, if any, see Environment variables, page 251. 3 The automatically set up library system include directories. See --dlib_config, page 276.

the compiler will search the header in the path that user configured in the project firstly. If I write the header file "errno.h" in my project, I find that the vscode cannot find the correct header file in my project; instead it find the file provided in the IAR system path. so it is recommended to list the system include header at the end of includePath in c_cpp_properties.json

ustbshen avatar Mar 11 '20 09:03 ustbshen