牵着老婆满街逛

严以律己,宽以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

STL Error Message Decryptor for C++

http://www.bdsoft.com/tools/stlfilt.html

STLFilt:
An STL Error Message Decryptor for C++

Open Source Freeware by Leor Zolman, Supporting:
Comeau C++
gcc 2.95.x/3.x (incl. DJGPP) (Dev-C++ compatible)
MSVC++ 6/7.x/8.x (incl. "Whidbey" and Dinkum Libraries)
Metrowerks CodeWarrior Pro 7/8
Borland C++ / C++Builder
Intel C++ 7/8
EDG Front End (Generic)
Digital Mars C++

STLFilt-ing is now selectable on both the Comeau and Dinkumwar e online compiler pages!

Participate in the STLFilt Forum on the new BD Software Message Board!




STLFilt simplifies and/or reformats long-winded C++ error and warning messages, with a focus on STL-related diagnostics (and for MSVC 6, it fully eliminates C4786 warnings and their detritus). The result renders many of even the most cryptic diagnostics comprehensible. Here is the rationale.

The active ingredient in each distribution is a Perl script, so you'll need a Perl interpreter installed; ActivePerl works best, and it's free.

The downloads follow, organized by platform:

  • Microsoft Visual C++ 6/7/8: stlfilt.zip (424K, updated 12/20/2005). Includes the "Proxy" CL compiler, multi-platform-aware STLTask tray-resident control utility (screen shot), and new support for long type-name wrapping (see the gcc section below). Demo runs: VC6VC7long type-names . Supports both the IDE and command line environments, in conjunction with any or all of the following C++ libraries:
    • Native MSVC 6
    • Native MSVC 7.x (.NET)
    • Native MSVC 8.x (WARNING! All IDE-based operational modes within VS2005 are currently broken, due to a recent change in the way the IDE pipes interprocess text. The problem is being worked on... -lz)
    • STLport4.x
    • Dinkum 3.08
    • Dinkum Unabridged Library

  • gcc 2.9x/3.x (incl. MinGW, DJGPP, etc.) [NOTE: STL diagnostic filtering for g++ 3.4 has been delayed since it has proven to be a PITA to implement... my fault, not the g++ folks'. Long message wrapping should still work, but it may be a while before I can get the STL-specific diagnostic filtering tuned acceptably] : For Windows: gstlfilt.zip (406K, updated 6/29/2005). For Unix, Linux, etc.: gstlfilt.tar (180K, updated 6/29/2005). Demo Run. Supports intelligent wrapping of very long type-names (such as those that arise in template metaprogramming applications) with a set of customizable rules suggested by David Abrahams (Demo). The Windows-based gcc Decryptor distribution now includes a Proxy c++ compiler (provides Dev-C++ compatibility, and also makes up for the Win9X command prompt's lack of stderr redirection) and multi-platform-aware STLTask utility. [For a nice, self-installing Windows-based MinGW gcc 3.x distribution, click here and download the self-installer (named MinGW-x.x.x-x.exe in the Current/MinGW section). You may also want to read these notes if you use extended (hash-based and slist) containers].
  • Comeau C++: For Windows: comofilt.zip (35K, updated 11/28/2003). For Unix, Linux, etc.: comofilt.tar (110K, updated 11/28/2003). Demo Run. The Comeau Decryptor now supports both the libcomo andDinkum libraries. Many thanks to Greg Comeau for building intrinsic command-line support for STLFilt into his compiler, and for his towering support of all aspects of Comeau C++ so far out of proportion to the package's microscopic selling price!

  • Intel C++ 7/8: For Windows (now with Proxy ICL and STLTask utilities): intelfilt.zip (389K, updated 9/08/2004). For Unix, Linux, etc.: intelfilt.tar (120K, updated 11/28/2003). Demo Run.

  • EDG C++ "Demo" Front End: For Windows: edgfilt.zip (32K, updated 11/25/2003). For Unix, Linux, etc.: edgfilt.tar (110K, updated 11/25/2003). If you're using Comeau or Intel C++, use one of those platform-specific distributions above. This version for the EDG demo compiler has only been tested with the Dinkum library.

Below is component-specific version information. Clicking on a version number displays the reverse-chronological change log for the associated component:

Component

Version
Number

Last
Updated

STLFilt.pl
Perl script for Visual C++

2.73b

6/29/2005

CL.cpp
Proxy CL for Visual C++

2.45a

12/20/2005

STLTask
GUI-based Decryption controller for MSVC, gcc and Intel C++ (Windows) platforms [screen shot]

3.07

9/8/2004

comofilt.pl
Perl script for Comeau C++

1.34

11/28/2003

gSTLFilt.pl
Perl script for gcc

2.47a

6/29/2005

C++.cpp
Proxy c++ for gcc (now supports the Dev-C++ IDE!)

3.44

11/25/2004

cwSTLFilt.pl
Perl script for Metrowerks CodeWarrior

1.10

11/24/2003

bSTLFilt.pl
Perl script for Borland C++ 5.5.1 and C++Builder Command-Line Tools

2.01

11/22/2003

edgfilt.pl
Perl script for EDG C++ Front End

1.02

11/25/2003

intelfilt.pl
Perl script for Intel C++

2.02

11/28/2003

dmSTLFilt.pl
Perl script for Digital Mars C++ Command-Line Tools

0.91

3/20/2004


For convenience, here is a cross-platform command line option overview. Full documentation on script options is present in the Perl source -- examine each script you use up to the comment reading "End of user-configurable settings" to see the full set of available customizable features specific to that version.

STLFilt in Print

Leor Zolman's C/C++ Users Journal article, An STL Error Message Decryptor for Visual C++, appears in the July, 2001 issue. As a CUJ Web Feature, it is freely available for viewing online in its entirety.

In their new book C++ Template Metaprogramming, David Abrahams and Aleksey Gurtovoy descrbie the use of STLFilt to help with formatting and re-ordering of metaprogramming errors. See section 8.2 ("Using Tools for Diagnostic Analysis"), pages 156-158.

Bruce Eckel and Chuck Allison mention STLFilt on page 320 of Thinking in C++ Volume Two: Practical Programming (entire book downloadable for free!)

Nicolai Josuttis and Daveed Vandevoorde cite STLFilt in section 6.6.1 of their book C++ Templates (2nd printing and up).

Scott Meyers mentions STLFilt in Item #49 of Effective STL. Note: The official download page for Effective STL's source code archive is here.

Related Tools

For a rules-based, generally configurable text filtering tool with many parallels to STLFilt (including pre-configured error decoding scripts for several C++ compilers), but implemented using Boost's Regex++ package, check out Daniel Frey's TextFilt.

Need a simple, handy way to stuff arbitrary values into a new STL container in a single statement? Check out BD Software's new, free, STL Container Initialization Library.

Giving and Getting Help

STLFilt is provided as open source Freeware in the interest of promoting the learning and use of C++. If you find this software useful, and would like a way to return the favor other than monetarily, then please note: STLFilt's author, Leor Zolman, makes a living leading hands-on, on-site training in C/C++, Java, Perl and Unix. Any help in bringing BD Software's course offerings to the attention of the folks in your training department would be sincerely appreciated.

Even though STLFilt is Freeware, you are entitled to support (believe it or not). When the author first reads about bugs on newsgroups and message boards, he has trouble understanding why no one bothered to tell him about them first. Please report bugs!!! Pretty please with sugar on top! In fact, any type of feedback is welcome. And please visit / participate in the STLFilt Message Board.

Still have no clue what an error message is trying to say, even after applying STLFilt? You can find me and other folks willing to help with those and just about all other kinds of C++-related questions on the Usenet newsgroup alt.comp.lang.learn.c-c++. Drop by and feel free to post your questions!

Please link to this page to raise awareness of STLFilt. Kudos to Comeau Computing, Dinkumware and Metrowerks for helping to spread the word via their web sites.

STLFilt is Freeware: open source, totally free, no strings attached...if you find the software useful, however, please consider making a $10 donation. Just click on the miniature bumper sticker below to donate through PayPal. Would you like one of these cool bumper stickers absolutely free? Just send a SASE (address here) and I'll send you a couple. Actually make a donation and I'll even send a stack of them ;-).

posted on 2006-07-01 13:37 杨粼波 阅读(370) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理