TCLAP is a small, flexible library that provides a simple interface for defining and accessing command line arguments. It was initially inspired by the user friendly CLAP library. 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!
Don't hesitate to send us your feedback!
Happy coding!
Choosing a version
- TCLAP 1.2 is for existing integrations that require the legacy 1.2 API or behavior. It receives only critical bug fixes.
- TCLAP 1.4 is recommended for projects requiring C++98 compatibility. It is a maintenance version with no new feature development.
- TCLAP 1.6 is recommended for projects using C++20 or later. It has modernized internals and an API mostly source compatible with 1.4.
Choose the version that matches your project's C++ and API requirements. Main 1.4 release page.