Adjusting the C/C++ indexer settings for large files

The C/C++ indexer is an optional component that builds a database of project source and header files to provide C and C++ search, navigation features, and parts of content assist. If enabled, the C/C++ indexer updates the database every time you import, create, edit or delete a project file.

Indexing can be restricted by file size or by cache size, in which case the indexer may not update the database after some action was performed with a project file, for instance, because the file was too large. An attempt to build a project after that may fail with unresolved symbol claims, as displayed in the figure below:


Indexing error

In the above example, the project was imported from a Git server to an S32 Design Studio workspace. The user was able to build the project without errors until the source file with the included large header file was opened. Now, at the attempt to rebuild the project the editor area flags errors on every single line that uses a symbol from that header file. The header file is included properly and is located at the include path, the compiler does not show any complains. Clicking an unresolved symbol with the CTRL key pressed leads straightly to the header file, but S32 Design Studio still claims it cannot resolve the symbols.

The issue occurs because the size of the header file is more than 17 MB, while the C/C++ indexer is configured by default to skip files larger than 8 MB from indexing. To resolve the issue, click Window > Preferences and go to C/C++ > Indexer:


Indexer configuration settings

On the Indexer page, adjust the C/C++ indexer settings as follows:

Click Apply and Close, clean and rebuild the project. If the errors still occur, restart S32 Design Studio .

Note: The indexer settings adjusted in the Preferences dialog box apply to all projects in the workspace. To specify the indexer settings for a particular project only, open the project properties and go to C/C++ General > Indexer. Enable the project-specific settings and update the indexer settings as described above.