Templatized C++ Command Line Parser Library

SourceForge.net Logo

TCLAP is a small, flexible library that provides a simple interface for defining and accessing command line arguments. It was intially inspired by the user friendly CLAP libary. The difference is that this library is templatized, so the argument class is type independent. Type independence avoids identical-except-for-type objects, such as IntArg, FloatArg, and StringArg. While the library is not strictly compliant with the GNU or POSIX standards, it is close.

TCLAP is written in ANSI C++ and is meant to be compatible with any standards-compliant C++ compiler. It is known to work on Linux, MacOS X, Windows, and Solaris platforms. The library is implemented entirely in header files making it easy to use and distribute with other software. It is licensed under the MIT License for worry free distribution.

TCLAP is now a mature, stable, and feature rich package. Unless I get really bored, it probably won't see much further development aside from bug fixes and compatibility updates. Please don't let any apparent project inactivity discourage you from using the software!

A note on versions. The latest version of TCLAP, version 1.1.0, contains some minor changes to the argument interfaces relative to the 1.0.x versions of the software. The changes shouldn't be difficult to accomodate, but it's something to consider if you're upgrading. Version 1.1.0 fixes all known bugs and has several cool features like flexible contraints on arguments and MultiSwitchArgs, so it may well be worth your while!

Don't hesitate to send us your feedback!

Happy coding!