3 C++ library for handling command line arguments.
9 $ wget https://github.com/quayle/command/releases/download/v0.2.1-deb/command_0.2.1_all.deb
10 $ sudo dpkg -i command_0.2.1_all.deb
14 You will need to have autotools installed (automake, autoconf, ...)
23 You need to enable c++11 support in your compiler. You can achieve that in
24 g++ and clang++ by adding `-std=c++11` compilation flag.
26 As this is header-only library, you don't need any additional steps.
33 #include <command/command.h>
34 #include <command/option.h>
36 using namespace command;
38 int main(int argc, char *argv[]) {
40 Command command(argc, argv, {
41 new Option<void>("-h", "Help", [](void) { std::cout << "Help information\n"; })
44 catch(const std::exception & e) {
51 Now program can be compiled & run using following commands:
53 $ g++ -std=c++11 example.cpp
59 Current documentation can be found at:
60 http://dlugolecki.net.pl/software/command/docs/
62 If for some reason it is unavailable, you can build it yourself. The only
63 requirement is to have [Doxygen](http://www.doxygen.org/) installed when `make` command is invoked.