I’m working on project which mixes C/C++ files
I have noticed that intellisense is broken in the following way:
having “main.c” to be compiled as C++ which includes “header.h”
“header.h” are driver libs from manufacturer which contains extern “C” to support C and C++ compilation
this compiles with no errors, but intellisense is not recognized extern “C” that way, it errors “[Clang InteliSense] Error: expected identifier or ‘C’
which means this header file recognized as C++ header file but InteliSense doesn’t think that.
Inside this header there is a simple function called XXX which not recognized by InteliSense in main.c [Clang InteliSense] Warning: implicit declartion of function ‘XXX’ is invalid in C99
If I set “main.c” as C it solves InteliSense recognition problem but it won’t compile, because main.c also includes other C++ header which contain classes, therefore it needed to be compiled as C++.
I have attached simple project which describes the problem
I hope you could help me solve with this issue, working InteliSense with C/C++ mix is a must for me
Best regards
Igor