Tuning Error Parsers

Error Parsers scan build output line by line looking for errors and warnings (also for certain informational messages). They generate Problem Markers which visually indicate those problems to a user. The problems are highlighted on the Console, populate the Problems view and shown in the editor. Problem markers are organized into Error Error, Warning Warning and InfoInfocategories.

There are several predefined Error Parsers where each one can handle output of a specific tool. Normally a toolchain defines a set of Error Parsers to deal with output of each tool. It is possible to redefine that set on a per-project basis in project properties:

  1. In the C/C++ Projects view, right-click the project, and select Properties.
  2. Expand C/C++ Build.
  3. Select Settings.
  4. Click the Error Parsers tab.
  5. In the Error parsers list, select error parsers.
  6. Click OK.

Note that the order of error parsers is significant. Normally an error parser will consume the line where it spotted an error/warning and the others down the line won't get a chance to parse it.

CDT provides one special kind of error parser, CDT pushd/popd CWD Locator. This parser does not create problem markers but it is looking for output of pushd and popd commands which are commonly used in makefiles to print the Current Working Directory (CWD). CDT can use this information to associate the file names appearing in the output relative to the CWD. Note that that kind of parser needs to be the first to be able to provide the CWD to the other parsers.

Most of the error parsers are configurable via regular expression patterns and a user can:

To customize error parsers do following:

  1. Select Window > Preferences .
  2. Expand C/C++.
  3. Select Error Parsers tab.
  4. Select error parser or Add a new one.
  5. Follow Error Parser Options to define your custom patterns

Related concepts
CDT Projects
Project file views

Related tasks
Tracking down compilation errors
Tuning Error Parsers

Related reference
Console View
Problems View
Make Targets View
Error Parsers tab
Error Parser Options

QNX Copyright Statement