Wednesday, April 1, 2009

Eclipse: How to get rid of the squiggly orange line in C++ editor

Problem: Using the Eclipse IDE with C or C++ code I have an annoying orange squiggly line throughout my code

Solution: Changing the C/C++ Indexer Markers options


Using the Eclipse IDE to programming C++ code, when an "include file" statement is not resolved, it is marked with an orange question mark and the whole code in the file we are editing are understriked with an orange squiggly line, as shown in the picture below.



It's really annoying, in particular when we are editing a file outside the real environment where the code will be compiled, and we already know that the included files are not physically joinable in that moment ;-)

So, in order to get rid of this squiggly orange line, just open the menu Window --> Preferences --> General --> Editors --> Text editors --> Annotations, look for the orange question mark symbol called "C/C++ Indexer Markers" and check out the "Text as" option, as shown in the figure below




In this way you can keep the orange question mark warning symbol in the Eclipse C++ editor, telling you that the "include file" statement is not working; but you can get rid of this annoying orange squiggly line, as shown in the figure below, and you get back a clean code! :-)

0 commenti: