My editor underlines every include in red but the code compiles and runs fine
Working on a microcontroller project, the editor reports that include errors were detected and asks me to update the include path. Every library header is underlined and autocomplete does not work.
The confusing part is that the project builds and the firmware runs correctly on the board.
So the compiler is finding these headers and the editor is not. What are these two things doing differently, and how do I make the editor agree?
@embedded_emre · yesterday
You have identified it exactly: two different programs are looking for those headers, and only one of them is doing the build.
So the red underlines are the analyser being uninformed, not the build being broken. That is worth internalising because it changes the fix: you are not correcting an error, you are giving a second tool the same information the first one already has.
Reply
Report