C/C++ search, by default, will only search your workspace. If you wish to search external files that are included by files in your workspace but don’t reside in your workspace, you must enable external search markers.
When a match in an external file is now found, it will be linked into your project and you will be able to open the match from the search pane as usual.
When a project is closed, or the workbench is shutdown the links are removed.
Search, C/C++ Preferences window
C/C++ search page, Search dialog box