gfilt
Front End"STLFilt simplifies and/or reformats long-winded C++ error and warning messages, with a focus on STL-related diagnostics." (from the author's web page).
We have installed gfilt
, which is the version of
STFilt that is oriented towards the GNU/Linux C++ compiler.
Rather than talk about it at length, I'll simply show you what a
nice job it does. Given a file
testdeq.cc that uses an auxilliary file
Widget.h, take a look at the following:
g++ testdeq.cc
".
This file is actually only 19 lines long, but a number of the lines
were too long to display in my browser window (the longest
having a length of 576 characters), so I have broken up
these extra long lines to be more "readable", the word
"readable" being taken with cum grano salis.
I have broken up most of the overlong lines. You can also look
at the
original version
of the file, should you be motivated to do so."gfilt testdeq.cc"
.
The biggest line is 74 characters long, easily displayable.
More to the point, the error messages have been whittled down to
something that's far more manageable.The latter is much easier to understand, yes?
If you're using the make
utility to manage a
project and you would like to use gfilt
, the simplest
thing to do is to add the line
CXX=gfiltnear the top of the
Makefile
. If the
Makefile
needs to refer to the C++ compiler, it
should use "$(CXX)
", rather than "g++
"
for this task. Once you're done with your project and you want to
use g++
(the usual C++ compiler), you can simply
comment out the definition of CXX
:
# CXX=gfilt