How To Install tclap on Fedora 34

tclap is Template-Only Command Line Argument Parser

Introduction

In this tutorial we learn how to install tclap on Fedora 34.

What is tclap

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 template-only, 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. The library is implemented entirely in header files making it easy to use and distribute with other software. tclap is now a mature, stable, and feature rich package. It probably will not see much further development aside from bug fixes and compatibility updates.

We can use yum or dnf to install tclap on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install tclap.

Install tclap on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tclap using dnf by running the following command:

sudo dnf -y install tclap

Install tclap on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tclap using yum by running the following command:

sudo yum -y install tclap

How To Uninstall tclap on Fedora 34

To uninstall only the tclap package we can use the following command:

sudo dnf remove tclap

tclap Package Contents on Fedora 34

/usr/include/tclap
/usr/include/tclap/Arg.h
/usr/include/tclap/ArgException.h
/usr/include/tclap/ArgTraits.h
/usr/include/tclap/CmdLine.h
/usr/include/tclap/CmdLineInterface.h
/usr/include/tclap/CmdLineOutput.h
/usr/include/tclap/Constraint.h
/usr/include/tclap/DocBookOutput.h
/usr/include/tclap/HelpVisitor.h
/usr/include/tclap/IgnoreRestVisitor.h
/usr/include/tclap/MultiArg.h
/usr/include/tclap/MultiSwitchArg.h
/usr/include/tclap/OptionalUnlabeledTracker.h
/usr/include/tclap/StandardTraits.h
/usr/include/tclap/StdOutput.h
/usr/include/tclap/SwitchArg.h
/usr/include/tclap/UnlabeledMultiArg.h
/usr/include/tclap/UnlabeledValueArg.h
/usr/include/tclap/ValueArg.h
/usr/include/tclap/ValuesConstraint.h
/usr/include/tclap/VersionVisitor.h
/usr/include/tclap/Visitor.h
/usr/include/tclap/XorHandler.h
/usr/include/tclap/ZshCompletionOutput.h
/usr/include/tclap/sstream.h
/usr/share/doc/tclap
/usr/share/doc/tclap/AUTHORS
/usr/share/doc/tclap/COPYING
/usr/share/doc/tclap/README
/usr/share/pkgconfig/tclap.pc

References

Summary

In this tutorial we learn how to install tclap on Fedora 34 using yum and dnf.