Using Links With Compiler Errors

If you spawn the compiler from Source Insight, using a custom command, and the output is captured and parsed for error messages, then you can use Go To First Link and Go To Next Link to view each error in your source files.

When you define the “Compile File” custom command, you should have the “Parse Source Links” option on. Source Insight will then search the compiler output and setup source links for each error message. In this case, the “link sources” are each error message in the compiler output file. The “link target” for each link is the file and line number given in each error message.

To view source lines with errors

To run a build or compile command, and let Source Insight position to each error message:

1. Run the “Compile File” or “Build Project” custom command, which is defined as described at “Creating a Compile and Build command”.

2. Assuming there are errors, when the compiler finishes the error messages will be in a command output window. Source Insight will automatically setup the source links and run the Go To First Link command. The first error message and the erroneous source line will be selected and made visible.

3. Run the Go To Next Link command. The next error message in the command output window is selected, and the target of that link is shown, as was the first error.

4. Continue to use the Go To Next Link command until all the links (error messages) have been visited. If there are no more links, then Source Insight beeps and the message, “No links.” will appear in the status bar.